-------------------------------------------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  C:\Users\meney\OneDrive\Manuscripts\HCI_2025/output/logs/run_ 8 Feb 2026_103200.log
  log type:  text
 opened on:   8 Feb 2026, 10:32:00

. 
. di as txt "==============================================================="
===============================================================

. di as txt "Replication run started: `c(current_date)' `c(current_time)'"
Replication run started:  8 Feb 2026 10:32:00

. di as txt "ROOT   = $ROOT"
ROOT   = C:\Users\meney\OneDrive\Manuscripts\HCI_2025

. di as txt "RAW    = $RAW"
RAW    = C:\Users\meney\OneDrive\Manuscripts\HCI_2025/data/raw

. di as txt "CLEAN  = $CLEAN"
CLEAN  = C:\Users\meney\OneDrive\Manuscripts\HCI_2025/data/clean

. di as txt "OUTPUT = $OUTPUT"
OUTPUT = C:\Users\meney\OneDrive\Manuscripts\HCI_2025/output

. di as txt "==============================================================="
===============================================================

. 
. /*******************************************************************************
>  0.1 REQUIRED PACKAGES
> ********************************************************************************/
. cap which wbopendata

. if _rc {
.     di as txt "Installing wbopendata (SSC)..."
.     ssc install wbopendata, replace
. }

. 
. cap which esttab

. if _rc {
.     di as txt "Installing estout (SSC)..."
.     ssc install estout, replace
. }

. 
. /*******************************************************************************
>  0.2 INPUT FILE CHECKS
> ********************************************************************************/
. foreach f in ///
>     "swiid9_9.dta" ///
>     "BL2013_MF1599_v2.2.dta" ///
>     "BL2013_M1599_v2.2.dta" ///
>     "BL2013_F1599_v2.2.dta" ///
>     "BL2013_MF2599_v2.2.dta" ///
>     "Lee_Lee_2024_HCHCq.dta" ///
>     "Lee_Lee_2024_Test_Score.dta" {
  2.     capture confirm file "$RAW/`f'"
  3.     if _rc {
  4.         di as error "Missing required file: $RAW/`f'"
  5.         error 601
  6.     }
  7. }

. 
. /*******************************************************************************
>  1. HELPER: COUNTRY HARMONIZATION
> ********************************************************************************/
. 
. * Centralized country-name harmonization
. capture program drop harmonize_country

. program define harmonize_country
  1.    cap confirm variable country
  2.     if _rc exit
  3. 
.     replace country = "Kyrgyzstan" if inlist(country,"Kyrgyz Republic")
  4.     replace country = "Russia"     if inlist(country,"Russian Federation")
  5.     replace country = "Slovakia"   if inlist(country,"Slovak Republic")
  6.     replace country = "Hong Kong"  if inlist(country,"Hong Kong SAR, China","China, Hong Kong Special Administrative Region")
  7.     replace country = "Venezuela"  if inlist(country,"Venezuela, RB")
  8.     replace country = "Cote d'Ivoire"     if inlist(country,"Côte d'Ivoire","Cote dIvoire")
  9.     replace country = "Iran, Islamic Rep" if inlist(country,"Iran","Iran (Islamic Republic of)", "Iran, Islamic Rep.")
 10.     replace country = "Egypt, Arab Rep"   if inlist(country,"Egypt","Egypt, Arab Rep.")
 11.     replace country = "Korea, Rep"        if inlist(country,"Korea","Republic of Korea", "Korea, Rep.")
 12.     replace country = "Tanzania"          if inlist(country,"United Republic of Tanzania")
 13.     replace country = "United States"     if inlist(country,"USA")
 14.     replace country = "Vietnam"           if inlist(country,"Viet Nam")
 15.         replace country = "Dominican Rep" if inlist(country,"Dominican Republic", "Dominican Rep.")
 16.         replace country = "Moldova"       if inlist(country,"Moldova, Rep.","Republic of Moldova")
 17. 
. end

. 
. /*******************************************************************************
>  2. WDI: BUILD 5-YEAR PANEL ********************************************************************************/
. * WDI indicators:
. * - NY.GDP.PCAP.KD.ZG : GDP per capita growth (annual %, real; constant-price series)
. * - NY.GDP.PCAP.KD    : GDP per capita level (constant-price) for initial income
. * - Controls: life expectancy, investment, openness, population growth
. wbopendata, indicator("NY.GDP.PCAP.KD.ZG;NY.GDP.PCAP.KD;SP.DYN.LE00.IN;NE.GDI.TOTL.ZS;NE.TRD.GNFS.ZS;SP.POP.GROW") long clear

    Metadata for indicator NY.GDP.PCAP.KD.ZG
-------------------------------------------------------------------------------------------------------------------------------------------------------
    Name: GDP per capita growth (annual %)
-------------------------------------------------------------------------------------------------------------------------------------------------------
    Collection: 2 World Development Indicators
-------------------------------------------------------------------------------------------------------------------------------------------------------
    Description: Gross domestic product is the total income earned through the production of goods and services in an economic territory during an
    accounting period. It can be measured in three different ways: using either the expenditure approach, the income approach, or the production
    approach. The core indicator has been divided by the general population to achieve a per capita estimate.This indicator denotes the percentage
    change over each previous year of the constant price (base year 2015) series in United States dollars.
-------------------------------------------------------------------------------------------------------------------------------------------------------
    Note: Country official statistics, National Statistical Organizations and or Central Banks;
-------------------------------------------------------------------------------------------------------------------------------------------------------
    Topic(s):  ; 3 Economy and Growth
-------------------------------------------------------------------------------------------------------------------------------------------------------



    Metadata for indicator NY.GDP.PCAP.KD
-------------------------------------------------------------------------------------------------------------------------------------------------------
    Name: GDP per capita (constant 2015 US$)
-------------------------------------------------------------------------------------------------------------------------------------------------------
    Collection: 2 World Development Indicators
-------------------------------------------------------------------------------------------------------------------------------------------------------
    Description: Gross domestic product is the total income earned through the production of goods and services in an economic territory during an
    accounting period. It can be measured in three different ways: using either the expenditure approach, the income approach, or the production
    approach. The core indicator has been divided by the general population to achieve a per capita estimate.This indicator is expressed in
    constant prices, meaning the series has been adjusted to account for price changes over time. The reference year for this adjustment is 2015.
    This indicator is expressed in United States dollars.
-------------------------------------------------------------------------------------------------------------------------------------------------------
    Note: Country official statistics, National Statistical Organizations and or Central Banks;
-------------------------------------------------------------------------------------------------------------------------------------------------------
    Topic(s):  ; 3 Economy and Growth
-------------------------------------------------------------------------------------------------------------------------------------------------------



    Metadata for indicator SP.DYN.LE00.IN
-------------------------------------------------------------------------------------------------------------------------------------------------------
    Name: Life expectancy at birth, total (years)
-------------------------------------------------------------------------------------------------------------------------------------------------------
    Collection: 2 World Development Indicators
-------------------------------------------------------------------------------------------------------------------------------------------------------
    Description: Life expectancy at birth indicates the number of years a newborn infant would live if prevailing patterns of mortality at the time
    of its birth were to stay the same throughout its life.
-------------------------------------------------------------------------------------------------------------------------------------------------------
    Note: World Population Prospects, United Nations (UN), uri: UN Population Division;
-------------------------------------------------------------------------------------------------------------------------------------------------------
    Topic(s):  ; 8 Health
-------------------------------------------------------------------------------------------------------------------------------------------------------



    Metadata for indicator NE.GDI.TOTL.ZS
-------------------------------------------------------------------------------------------------------------------------------------------------------
    Name: Gross capital formation (% of GDP)
-------------------------------------------------------------------------------------------------------------------------------------------------------
    Collection: 2 World Development Indicators
-------------------------------------------------------------------------------------------------------------------------------------------------------
    Description: Gross capital formation includes acquisitions less disposals of produced assets for purposes of fixed capital formation,
    inventories or valuables. This indicator is expressed as a percentage of Gross Domestic Product (GDP) which is the total income earned through
    the production of goods and services in an economic territory during an accounting period.
-------------------------------------------------------------------------------------------------------------------------------------------------------
    Note: Country official statistics, National Statistical Organizations and or Central Banks;
-------------------------------------------------------------------------------------------------------------------------------------------------------
    Topic(s):  ; 3 Economy and Growth
-------------------------------------------------------------------------------------------------------------------------------------------------------



    Metadata for indicator NE.TRD.GNFS.ZS
-------------------------------------------------------------------------------------------------------------------------------------------------------
    Name: Trade (% of GDP)
-------------------------------------------------------------------------------------------------------------------------------------------------------
    Collection: 2 World Development Indicators
-------------------------------------------------------------------------------------------------------------------------------------------------------
    Description: Trade is the sum of exports and imports of goods and services. This indicator is expressed as a percentage of Gross Domestic
    Product (GDP) which is the total income earned through the production of goods and services in an economic territory during an accounting
    period.
-------------------------------------------------------------------------------------------------------------------------------------------------------
    Note: Country official statistics, National Statistical Organizations and or Central Banks;
-------------------------------------------------------------------------------------------------------------------------------------------------------
    Topic(s):  ; 3 Economy and Growth
-------------------------------------------------------------------------------------------------------------------------------------------------------



    Metadata for indicator SP.POP.GROW
-------------------------------------------------------------------------------------------------------------------------------------------------------
    Name: Population growth (annual %)
-------------------------------------------------------------------------------------------------------------------------------------------------------
    Collection: 2 World Development Indicators
-------------------------------------------------------------------------------------------------------------------------------------------------------
    Description: Annual population growth rate for year t is the exponential rate of growth of midyear population from year t-1 to t, expressed as
    a percentage. Population is based on the de facto definition of population, which counts all residents regardless of legal status or
    citizenship.
-------------------------------------------------------------------------------------------------------------------------------------------------------
    Note: World Population Prospects, United Nations (UN), note: Derived from total population, publisher: UN Population Division;
-------------------------------------------------------------------------------------------------------------------------------------------------------
    Topic(s):
-------------------------------------------------------------------------------------------------------------------------------------------------------



. 
. rename countryname country

. harmonize_country
(65 real changes made)
(65 real changes made)
(65 real changes made)
(65 real changes made)
(65 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(65 real changes made)
(0 real changes made)

. 
. rename ny_gdp_pcap_kd_zg ggdppc

. rename ny_gdp_pcap_kd    GDPpc

. rename sp_dyn_le00_in    expectancy

. rename ne_gdi_totl_zs    GCF_GDP

. rename ne_trd_gnfs_zs    openness

. rename sp_pop_grow       gpop

. 
. gen ln_GDPpc = ln(GDPpc)
(2,984 missing values generated)

. 
. * Five-year periods (aligned with Barro–Lee periodicity)
. gen period = 5*floor(year/5)

. 
. * Keep years in the range
. keep if inrange(year,1975,2009)
(7,980 observations deleted)

. 
. * Five-year means
. collapse (mean) ggdppc GDPpc ln_GDPpc GCF_GDP openness gpop expectancy, ///
>     by(country countrycode region period)

. 
. save "$CLEAN/WDI_5yr.dta", replace
(file C:\Users\meney\OneDrive\Manuscripts\HCI_2025/data/clean/WDI_5yr.dta not found)
file C:\Users\meney\OneDrive\Manuscripts\HCI_2025/data/clean/WDI_5yr.dta saved

. 
. /*******************************************************************************
>  3. SWIID: BUILD 5-YEAR INEQUALITY (gross/net)
> ********************************************************************************/
. use "$RAW/swiid9_9.dta", clear
(SWIID v9.9, June 2025. Refer to the stata_swiid.pdf file for usage instructions.)

. 
. keep country year _*

. foreach v in gini_disp gini_mkt rel_red abs_red {
  2.     egen `v' = rowmean(_*`v')
  3. }
(3,787 missing values generated)
(3,787 missing values generated)

. mi unset
(6519 m=0 obs now marked as complete)
(273200 values of passive variable rel_red in m>0 updated to match values in m=0)
(273200 values of passive variable abs_red in m>0 updated to match values in m=0)
(651899 values of imputed variable gini_disp in m>0 updated to match values in m=0)
(651900 values of imputed variable gini_mkt in m>0 updated to match values in m=0)

            Variables
    Original          New                Meaning
    -----------------------------------------------------------------------
    _mi_miss          mi_miss            0=orig-complete, 1=orig-incomplete
    _#_gini_disp      gini_disp_#_       imputed values of gini_disp
    _#_gini_mkt       gini_mkt_#_        imputed values of gini_mkt
    _#_rel_red        rel_red_#_         values of passive rel_red
    _#_abs_red        abs_red_#_         values of passive abs_red
    -----------------------------------------------------------------------
    # = 1, 2, ..., 100

. 
. harmonize_country
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(37 real changes made)
(55 real changes made)
(49 real changes made)
(58 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(38 real changes made)
(0 real changes made)

. keep country year gini_disp gini_mkt

. rename (gini_disp gini_mkt) (gini_net gini_gross)

. 
. keep if inrange(year,1975,2009)
(2,416 observations deleted)

. gen period = 5*floor(year/5)

. collapse (mean) gini_net gini_gross, by(country period)

. 
. label var gini_gross "Income inequality (GINI)"

. label var gini_net   "Net income inequality (GINI)"

. 
. save "$CLEAN/GINI_5yr.dta", replace
(file C:\Users\meney\OneDrive\Manuscripts\HCI_2025/data/clean/GINI_5yr.dta not found)
file C:\Users\meney\OneDrive\Manuscripts\HCI_2025/data/clean/GINI_5yr.dta saved

. 
. 
. /*******************************************************************************
>  4. BARRO–LEE: SCHOOLING (MF15, M15, F15, MF25)
> ********************************************************************************/
. * MF15 total
. use "$RAW/BL2013_MF1599_v2.2.dta", clear

. rename WBcode countrycode

. keep country countrycode year yr_sch yr_sch_pri yr_sch_sec yr_sch_ter

. keep if inrange(year,1975,2009)
(876 observations deleted)

. harmonize_country
(0 real changes made)
(7 real changes made)
(0 real changes made)
(7 real changes made)
(0 real changes made)
(7 real changes made)
(7 real changes made)
(7 real changes made)
(7 real changes made)
(7 real changes made)
(7 real changes made)
(7 real changes made)
(7 real changes made)
(7 real changes made)

. replace countrycode = "MDA" if country=="Moldova" & countrycode=="ROM"
(7 real changes made)

. rename year period

. save "$CLEAN/SCH_MF15.dta", replace
(file C:\Users\meney\OneDrive\Manuscripts\HCI_2025/data/clean/SCH_MF15.dta not found)
file C:\Users\meney\OneDrive\Manuscripts\HCI_2025/data/clean/SCH_MF15.dta saved

. 
. * M15
. use "$RAW/BL2013_M1599_v2.2.dta", clear

. rename WBcode countrycode

. keep country countrycode year yr_sch yr_sch_pri yr_sch_sec yr_sch_ter

. keep if inrange(year,1975,2009)
(876 observations deleted)

. harmonize_country
(0 real changes made)
(7 real changes made)
(0 real changes made)
(7 real changes made)
(0 real changes made)
(7 real changes made)
(7 real changes made)
(7 real changes made)
(7 real changes made)
(7 real changes made)
(7 real changes made)
(7 real changes made)
(7 real changes made)
(7 real changes made)

. replace countrycode = "MDA" if country=="Moldova" & countrycode=="ROM"
(7 real changes made)

. rename year period

. rename (yr_sch yr_sch_pri yr_sch_sec yr_sch_ter) ///
>        (Myr_sch Myr_sch_pri Myr_sch_sec Myr_sch_ter)

. save "$CLEAN/SCH_M15.dta", replace
(file C:\Users\meney\OneDrive\Manuscripts\HCI_2025/data/clean/SCH_M15.dta not found)
file C:\Users\meney\OneDrive\Manuscripts\HCI_2025/data/clean/SCH_M15.dta saved

. 
. * F15
. use "$RAW/BL2013_F1599_v2.2.dta", clear

. rename WBcode countrycode

. keep country countrycode year yr_sch yr_sch_pri yr_sch_sec yr_sch_ter

. keep if inrange(year,1975,2009)
(876 observations deleted)

. harmonize_country
(0 real changes made)
(7 real changes made)
(0 real changes made)
(7 real changes made)
(0 real changes made)
(7 real changes made)
(7 real changes made)
(7 real changes made)
(7 real changes made)
(7 real changes made)
(7 real changes made)
(7 real changes made)
(7 real changes made)
(7 real changes made)

. replace countrycode = "MDA" if country=="Moldova" & countrycode=="ROM"
(7 real changes made)

. rename year period

. rename (yr_sch yr_sch_pri yr_sch_sec yr_sch_ter) ///
>        (Fyr_sch Fyr_sch_pri Fyr_sch_sec Fyr_sch_ter)

. save "$CLEAN/SCH_F15.dta", replace
(file C:\Users\meney\OneDrive\Manuscripts\HCI_2025/data/clean/SCH_F15.dta not found)
file C:\Users\meney\OneDrive\Manuscripts\HCI_2025/data/clean/SCH_F15.dta saved

. 
. * MF25 (adult schooling 25+)
. use "$RAW/BL2013_MF2599_v2.2.dta", clear

. rename WBcode countrycode

. keep country countrycode year yr_sch

. keep if inrange(year,1975,2009)
(876 observations deleted)

. harmonize_country
(0 real changes made)
(7 real changes made)
(0 real changes made)
(7 real changes made)
(0 real changes made)
(7 real changes made)
(7 real changes made)
(7 real changes made)
(7 real changes made)
(7 real changes made)
(7 real changes made)
(7 real changes made)
(7 real changes made)
(7 real changes made)

. replace countrycode = "MDA" if country=="Moldova" & countrycode=="ROM"
(7 real changes made)

. rename year period

. rename yr_sch yr_sch25

. save "$CLEAN/SCH_MF25.dta", replace
(file C:\Users\meney\OneDrive\Manuscripts\HCI_2025/data/clean/SCH_MF25.dta not found)
file C:\Users\meney\OneDrive\Manuscripts\HCI_2025/data/clean/SCH_MF25.dta saved

. 
. 
. /*******************************************************************************
>  5. MERGE ALL SOURCES 
> ********************************************************************************/
. use "$CLEAN/WDI_5yr.dta", clear

. 
. * SWIID inequality is keyed on (country, period)
. merge 1:1 country period using "$CLEAN/GINI_5yr.dta", keep(3) nogen

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                               822  
    -----------------------------------------

. 
. * Barro–Lee is keyed on (countrycode, period)
. merge 1:1 countrycode period using "$CLEAN/SCH_MF15.dta", keep(3) nogen
(variable period was float, now double to accommodate using data's values)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                               703  
    -----------------------------------------

. merge 1:1 countrycode period using "$CLEAN/SCH_M15.dta",  keep(3) nogen

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                               703  
    -----------------------------------------

. merge 1:1 countrycode period using "$CLEAN/SCH_F15.dta",  keep(3) nogen

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                               703  
    -----------------------------------------

. merge 1:1 countrycode period using "$CLEAN/SCH_MF25.dta", keep(1 3) nogen

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                               703  
    -----------------------------------------

. 
. * Panel identifiers and structure
. egen id = group(countrycode), label

. 
. * Period is in five-year steps: delta(5) ensures L. = previous five-year period
. xtset id period, delta(5)

Panel variable: id (unbalanced)
 Time variable: period, 1975 to 2005
         Delta: 5 units

. 
. * Analysis window (outcomes 1980–2009)
. keep if inrange(period,1980,2009)
(55 observations deleted)

. 
. /*******************************************************************************
>  6. VARIABLE CONSTRUCTION
> ********************************************************************************/
. 
. * Initial income (lagged log GDP per capita)
. gen l_ln_GDPpc = L.ln_GDPpc
(146 missing values generated)

. 
. * Post-primary = secondary + tertiary 
. egen yr_sch_post = rowtotal(yr_sch_sec yr_sch_ter)

. 
. * Lags for schooling (quantity)
. foreach v in yr_sch yr_sch_pri yr_sch_sec yr_sch_ter yr_sch_post {
  2.     gen l_`v' = L.`v'
  3. }
(132 missing values generated)
(132 missing values generated)
(132 missing values generated)
(132 missing values generated)
(132 missing values generated)

. 
. * Inequality-adjusted HC (gross) by level 
. foreach v in yr_sch_pri yr_sch_sec yr_sch_ter yr_sch_post {
  2.     local q = subinstr("`v'","yr_sch","qahc",.)
  3.     gen `q'   = `v' * (1 - gini_gross/100)
  4.     gen l_`q' = L.`q'
  5. }
(132 missing values generated)
(132 missing values generated)
(132 missing values generated)
(132 missing values generated)

. 
. * Lags: Income inequality
. gen l_gini_gross = L.gini_gross
(132 missing values generated)

. gen l_gini_net = L.gini_net
(132 missing values generated)

. 
. * Adult (25+)
. gen l_yr_sch25 = L.yr_sch25
(132 missing values generated)

. 
. gen gini_st      = gini_gross/100

. 
. * Labels 
. label var ggdppc           "GDP per capita growth"

. label var l_yr_sch      "Mean years of schooling"

. label var l_yr_sch_pri   "Primary schooling years"

. label var l_yr_sch_post  "Post-primary schooling years"

. label variable l_yr_sch25 "Adult schooling (25+)"

. label var yr_sch                "Mean years of schooling"

. label var yr_sch_pri     "Primary schooling years"

. label var yr_sch_post     "Post-primary schooling years"

. 
. *macro variable
. label var ln_GDPpc      "GDP per capita (Log)"

. label var l_ln_GDPpc    "Initial GDP per capita"

. label var GCF_GDP       "Investment share of GDP (%)"

. label var openness     "Trade openness (% of GDP)"

. label var gpop          "Population growth rate (%)"

. label var expectancy   "Life expectancy"

. 
. 
. * Checking the data and missing values 
. misstable summarize ggdppc ln_GDPpc l_yr_sch GCF_GDP openness gpop expectancy l_ln_GDPpc
                                                               Obs<.
                                                +------------------------------
               |                                | Unique
      Variable |     Obs=.     Obs>.     Obs<.  | values        Min         Max
  -------------+--------------------------------+------------------------------
        ggdppc |        15                 633  |   >500  -19.22698    16.43377
      ln_GDPpc |        14                 634  |   >500   5.510844    11.57787
      l_yr_sch |       132                 516  |   >500   .8926895    12.69431
       GCF_GDP |        78                 570  |   >500   3.958171    45.89199
      openness |        75                 573  |   >500   13.27254    407.1204
    l_ln_GDPpc |       146                 502  |   >500   5.510844    11.47365
  -----------------------------------------------------------------------------

. count if !missing(ggdppc, l_yr_sch)
  515

. count if !missing(ggdppc, ln_GDPpc, l_yr_sch, GCF_GDP, openness, gpop, expectancy, l_ln_GDPpc)
  459

. 
. * Convenience globals for controls and table export styling
. global CONTROLS "GCF_GDP openness gpop expectancy l_ln_GDPpc"

. global ESTOPT   "se r2 label star(* 0.10 ** 0.05 *** 0.01) b(%9.3f) se(%9.3f) drop(*.period) nomtitles nogaps compress"

. 
. * Analysis window (outcomes 1980–2009)
. keep if inrange(period,1980,2009)
(0 observations deleted)

. 
. save "$CLEAN/HCI_data.dta", replace
(file C:\Users\meney\OneDrive\Manuscripts\HCI_2025/data/clean/HCI_data.dta not found)
file C:\Users\meney\OneDrive\Manuscripts\HCI_2025/data/clean/HCI_data.dta saved

. 
. /*******************************************************************************
>  7. BASELINE SAMPLE (T >= 5) 
> ********************************************************************************/
. use "$CLEAN/HCI_data.dta", clear

. xtset id period, delta(5)

Panel variable: id (unbalanced)
 Time variable: period, 1980 to 2005
         Delta: 5 units

. 
. by id: gen T = _N

. tab T

          T |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |          8        1.23        1.23
          2 |          8        1.23        2.47
          3 |         21        3.24        5.71
          4 |         64        9.88       15.59
          5 |        175       27.01       42.59
          6 |        372       57.41      100.00
------------+-----------------------------------
      Total |        648      100.00

. drop if T < 5 
(101 observations deleted)

. tab T // Baseline sample: countries with at least FIVE five-year observations

          T |      Freq.     Percent        Cum.
------------+-----------------------------------
          5 |        175       31.99       31.99
          6 |        372       68.01      100.00
------------+-----------------------------------
      Total |        547      100.00

. drop T

. xtset id period, delta(5)

Panel variable: id (unbalanced)
 Time variable: period, 1980 to 2005
         Delta: 5 units

. 
. * Diagnostics (countries + obs)
. egen tag_country = tag(id)

. quietly count if tag_country==1

. di as txt "Baseline (T>=5) countries: " r(N)    
Baseline (T>=5) countries: 97

. drop tag_country

. quietly count

. di as txt "Baseline (T>=5) observations: " r(N) 
Baseline (T>=5) observations: 547

.  
.  /* 97 remaining countries and 547 observations averagged over 5-years non-overlapping periods*/
.  
. save "$CLEAN/HCI_data_final.dta", replace
(file C:\Users\meney\OneDrive\Manuscripts\HCI_2025/data/clean/HCI_data_final.dta not found)
file C:\Users\meney\OneDrive\Manuscripts\HCI_2025/data/clean/HCI_data_final.dta saved

. 
. /*******************************************************************************
>  8. TABLES: DESCRIPTIVES
> ********************************************************************************/
. use "$CLEAN/HCI_data_final.dta", clear

. 
. xtset id period, delta(5) 

Panel variable: id (unbalanced)
 Time variable: period, 1980 to 2005
         Delta: 5 units

.  
. * Table 1: Descriptive statistics
. ********************************************************************************
. estpost summarize ///
>     ggdppc yr_sch yr_sch_pri yr_sch_post gini_gross ///
>     GCF_GDP openness gpop expectancy ln_GDPpc

             |  e(count)   e(sum_w)    e(mean)     e(Var)      e(sd)     e(min)     e(max)     e(sum) 
-------------+----------------------------------------------------------------------------------------
      ggdppc |       532        532   1.913948   12.15183   3.485948  -19.22698   16.43377   1018.221 
      yr_sch |       547        547   7.530239   7.418679   2.723725   .9853624   12.85811   4119.041 
  yr_sch_pri |       547        547   4.647961    2.27642   1.508781   .6378934   8.876706   2542.435 
 yr_sch_post |       547        547   2.882278   2.609442   1.615377   .1572607   7.603034   1576.606 
  gini_gross |       547        547   45.86412   36.38508   6.032005   31.57511    71.5221   25087.68 
     GCF_GDP |       479        479   23.77339   36.63687    6.05284   3.958171   45.89199   11387.45 
    openness |       481        481   74.21229   2866.817   53.54266   13.27254   407.1204   35696.11 
        gpop |       547        547   1.326198   1.742637    1.32009  -1.955914   14.65199   725.4302 
  expectancy |       547        547   68.86125   76.81381   8.764349    38.6996   82.46063   37667.11 
    ln_GDPpc |       533        533   8.635337      2.024   1.422674   5.698755   11.57787   4602.635 

. 
. esttab using "$TABLES/Table1.rtf", replace ///
>     cells("count mean(fmt(2)) sd(fmt(2)) min(fmt(2)) max(fmt(2))") ///
>     collabels("Obs." "Mean" "SD" "Min" "Max", replace) ///
>         nomtitles noobs nonumber label ///
>     title("Table 1: Descriptive Statistics")
(file C:\Users\meney\OneDrive\Manuscripts\HCI_2025/output/tables/Table1.rtf not found)
(output written to C:\Users\meney\OneDrive\Manuscripts\HCI_2025/output/tables/Table1.rtf)

. 
.         
. * Figure 1: Average Trends in Schooling, Inequality, and Growth (1980–2009)
. ********************************************************************************
.         
. preserve

. 
. * Collapse to period means (unweighted)
. collapse (mean) yr_sch gini_st ggdppc, by(period)

. 
. * 1) Schooling
. twoway ///
>     (line yr_sch period, lwidth(medthick)), ///
>     ytitle("Mean years of schooling") ///
>     xtitle("Five-year periods") ///
>     title("Schooling") ///
>     graphregion(color(white)) ///
>         xlabel(1980 "1980–84" 1985 "1985–89" 1990 "1990–94" ///
>            1995 "1995–99" 2000 "2000–04" 2005 "2005–09") ///
>     name(G_sch, replace)

. 
. * 2) Inequality
. twoway ///
>     (line gini_st period, lwidth(medthick)), ///
>     ytitle("Gini") ///
>         ylabel(0.4(0.025)0.5, format(%4.3f)) ///
>     xtitle("Five-year periods") ///
>     title("Income Inequality") ///
>     graphregion(color(white)) ///
>         xlabel(1980 "1980–84" 1985 "1985–89" 1990 "1990–94" ///
>            1995 "1995–99" 2000 "2000–04" 2005 "2005–09") ///
>     name(G_gini, replace)

. 
. * 3) Growth
. twoway ///
>     (line ggdppc period, lwidth(medthick)), ///
>     ytitle("GDP per capita growth (%)") ///
>     xtitle("Five-year periods") ///
>     title("GDP per capita growth") ///
>     graphregion(color(white)) ///
>         xlabel(1980 "1980–84" 1985 "1985–89" 1990 "1990–94" ///
>            1995 "1995–99" 2000 "2000–04" 2005 "2005–09") ///
>     name(G_grow, replace)

. 
. * Combine into one figure (one column)
. graph combine G_sch G_gini G_grow, ///
>     col(1) ///
>     imargin(small) ///
>     graphregion(color(white)) 

.         graph export "$FIGS/Trends.emf", replace
(file C:\Users\meney\OneDrive\Manuscripts\HCI_2025/output/figures/Trends.emf not found)
file C:\Users\meney\OneDrive\Manuscripts\HCI_2025/output/figures/Trends.emf saved as Enhanced Metafile format

. 
. restore

.                 
.         
. * Table A.1: List of countries 
. ********************************************************************************
. preserve

. keep country

. duplicates drop

Duplicates in terms of all variables

(450 observations deleted)

. sort country

. 
. local cols = 5

. local N = _N

. local rows = ceil(`N'/`cols')

. 
. putdocx clear

. putdocx begin

. putdocx paragraph, style(Heading3)

. putdocx text ("Table A.1: List of Countries")

. 
. * Create Word table
. putdocx table A1 = (`rows', `cols')

. 
. * Fill the table column-wise (down columns)
. local k = 0

. forvalues c = 1/`cols' {
  2.     forvalues r = 1/`rows' {
  3.         local ++k
  4.         if `k' <= `N' {
  5.             local val = country[`k']
  6.             putdocx table A1(`r',`c') = ("`val'")
  7.         }
  8.         else {
  9.             putdocx table A1(`r',`c') = ("")
 10.         }
 11.     }
 12. }

. 
. putdocx save "$TABLES/TableA1.docx", replace
successfully created "C:/Users/meney/OneDrive/Manuscripts/HCI_2025/output/tables/TableA1.docx"

. restore

. 
. 
. * Table A.2: Correlation matrix
. ********************************************************************************
. estpost correlate ///
>     ggdppc l_yr_sch GCF_GDP openness gpop expectancy l_ln_GDPpc, matrix

             |      e(b)     e(rho)       e(p)   e(count) 
-------------+--------------------------------------------
ggdppc       |                                            
      ggdppc |         1          1                   532 
    l_yr_sch |  .0177506   .0177506   .7075789        449 
     GCF_GDP |   .249444    .249444   3.26e-08        478 
    openness |  .1428417   .1428417   .0017043        480 
        gpop | -.0467723  -.0467723   .2815428        532 
  expectancy |  .1327874   .1327874   .0021467        532 
  l_ln_GDPpc | -.0808629  -.0808629    .091722        436 
l_yr_sch     |                                            
    l_yr_sch |         1          1                   450 
     GCF_GDP |  .2271126   .2271126   3.69e-06        407 
    openness |  .2859352   .2859352   3.73e-09        410 
        gpop | -.5091317  -.5091317   4.76e-31        450 
  expectancy |  .7059906   .7059906   4.00e-69        450 
  l_ln_GDPpc |  .7071873   .7071873   2.44e-67        436 
GCF_GDP      |                                            
     GCF_GDP |         1          1                   479 
    openness |  .2629189   .2629189   5.75e-09        476 
        gpop |  -.032478   -.032478   .4782343        479 
  expectancy |  .3519352   .3519352   2.06e-15        479 
  l_ln_GDPpc |  .1507992   .1507992   .0024958        400 
openness     |                                            
    openness |         1          1                   481 
        gpop |  -.039489   -.039489    .387508        481 
  expectancy |  .2907529   .2907529   7.97e-11        481 
  l_ln_GDPpc |  .2598442   .2598442   1.26e-07        402 
gpop         |                                            
        gpop |         1          1                   547 
  expectancy | -.4011297  -.4011297   1.46e-22        547 
  l_ln_GDPpc | -.3087385  -.3087385   4.40e-11        436 
expectancy   |                                            
  expectancy |         1          1                   547 
  l_ln_GDPpc |  .8205173   .8205173   1.8e-107        436 
l_ln_GDPpc   |                                            
  l_ln_GDPpc |         1          1                   436 

. 
. esttab using "$TABLES/TableA2.rtf", replace ///
>     unstack ///
>     cells("b(fmt(2))") ///
>     nomtitles nonumber ///
>     label noobs ///
>     collabels(none) ///
>     eqlabels("1" "2" "3" "4" "5" "6" "7") ///
>     title("Table A.2: Correlation Matrix")
(file C:\Users\meney\OneDrive\Manuscripts\HCI_2025/output/tables/TableA2.rtf not found)
(output written to C:\Users\meney\OneDrive\Manuscripts\HCI_2025/output/tables/TableA2.rtf)

. 
. 
. * Table A.3: Summary statistics by region
. ********************************************************************************
. global SUMVARS ggdppc yr_sch yr_sch_pri yr_sch_post gini_gross GCF_GDP openness gpop expectancy ln_GDPpc

. 
. foreach r in EAS ECS LCN MEA NAC SAS SSF {
  2.     estpost summarize $SUMVARS if region=="`r'"
  3.     est store R_`r'
  4. }

             |  e(count)   e(sum_w)    e(mean)     e(Var)      e(sd)     e(min)     e(max)     e(sum) 
-------------+----------------------------------------------------------------------------------------
      ggdppc |        78         78   3.188392   7.813264   2.795222  -1.748557   10.87539   248.6946 
      yr_sch |        78         78   8.358483    5.36816   2.316929   3.634843   11.77061   651.9616 
  yr_sch_pri |        78         78   5.104606   1.039316   1.019469   2.873905   7.025858   398.1593 
 yr_sch_post |        78         78   3.253876   2.215382   1.488416    .580621   5.796811   253.8023 
  gini_gross |        78         78    42.7415   15.57815   3.946917   31.57511   48.46479   3333.837 
     GCF_GDP |        72         72   28.52497   39.83187   6.311249   17.13766   45.89199   2053.797 
    openness |        72         72   104.9018   10081.22   100.4053   17.12938   407.1204   7552.932 
        gpop |        78         78   1.375899   .7115446    .843531   .0447211   3.596674   107.3201 
  expectancy |        78         78   72.18786   34.29455   5.856155    59.7462   82.46063   5630.653 
    ln_GDPpc |        78         78   8.905112    1.56871   1.252481   6.212552   10.86746   694.5987 

             |  e(count)   e(sum_w)    e(mean)     e(Var)      e(sd)     e(min)     e(max)     e(sum) 
-------------+----------------------------------------------------------------------------------------
      ggdppc |       183        183   1.625651   18.84958    4.34161  -19.22698   10.68137   297.4942 
      yr_sch |       198        198    9.37837   2.300033   1.516586   4.576279   12.72854   1856.917 
  yr_sch_pri |       198        198   5.469748     1.6107   1.269133   3.125128   8.876706    1083.01 
 yr_sch_post |       198        198   3.908622   1.658759   1.287928   1.315906   7.603034   773.9072 
  gini_gross |       198        198   44.36417   21.54927   4.642119   31.90935   53.98554   8784.105 
     GCF_GDP |       175        175   24.29471   19.45706   4.411016   11.20131   42.28608   4251.575 
    openness |       175        175    85.4989   1641.131   40.51087   33.55404   290.6376   14962.31 
        gpop |       198        198   .3331989   .5809043   .7621708  -1.955914   3.237587   65.97338 
  expectancy |       198        198   73.61969    20.7692   4.557323     59.201   81.70097    14576.7 
    ln_GDPpc |       184        184   9.496855   1.450383   1.204318   5.981155   11.57787   1747.421 

             |  e(count)   e(sum_w)    e(mean)     e(Var)      e(sd)     e(min)     e(max)     e(sum) 
-------------+----------------------------------------------------------------------------------------
      ggdppc |        98         98   1.780143   10.19057   3.192267  -4.433588   16.43377    174.454 
      yr_sch |        98         98   6.924491   2.886876   1.699081   2.856914   10.08142   678.6001 
  yr_sch_pri |        98         98   4.650362    1.08219   1.040284    2.08652   6.782764   455.7354 
 yr_sch_post |        98         98   2.274129   .7802316   .8833072   .5998495   4.444427   222.8646 
  gini_gross |        98         98   50.26344   23.53083   4.850859     41.549   61.53308   4925.818 
     GCF_GDP |        83         83   21.03373   18.99174   4.357951   12.59101   32.65465     1745.8 
    openness |        81         81   56.33705   1022.522    31.9769   13.75684   155.3566   4563.301 
        gpop |        98         98   1.526403   .6437117   .8023165   -.531369   2.844912   149.5875 
  expectancy |        98         98   70.33975    19.0323   4.362602    55.1712    79.1152   6893.295 
    ln_GDPpc |        98         98   8.615596   .4599127   .6781686   5.902911     10.052   844.3284 

             |  e(count)   e(sum_w)    e(mean)     e(Var)      e(sd)     e(min)     e(max)     e(sum) 
-------------+----------------------------------------------------------------------------------------
      ggdppc |        44         44    1.58105   6.381447   2.526153  -5.332566   6.031879   69.56619 
      yr_sch |        44         44   6.063294   6.353259   2.520567   1.757799   11.46612    266.785 
  yr_sch_pri |        44         44    3.50265   1.631196   1.277183   1.016525   6.371128   154.1166 
 yr_sch_post |        44         44   2.560644   1.641236   1.281107    .741274   5.200967   112.6684 
  gini_gross |        44         44   43.83899    12.1741    3.48914   37.85631   52.83608   1928.916 
     GCF_GDP |        43         43   27.96213   30.82142   5.551704   17.92743   41.25904   1202.372 
    openness |        43         43   68.21693   706.3789   26.57779   20.94422   137.5431   2933.328 
        gpop |        44         44   2.741231   4.675645   2.162324   .9311796   14.65199   120.6142 
  expectancy |        44         44    69.7296   33.53624   5.791048    56.8468   80.71317   3068.102 
    ln_GDPpc |        44         44    8.55777   1.294985   1.137974    7.20296   11.02978   376.5419 

             |  e(count)   e(sum_w)    e(mean)     e(Var)      e(sd)     e(min)     e(max)     e(sum) 
-------------+----------------------------------------------------------------------------------------
      ggdppc |        12         12   1.513915   1.049261   1.024334  -.0003781   2.845722   18.16698 
      yr_sch |        12         12   11.54151    1.11234   1.054675   9.937581   12.85811   138.4981 
  yr_sch_pri |        12         12    5.81371   .0142427   .1193429   5.594739   5.949883   69.76453 
 yr_sch_post |        12         12   5.727799   .8835929   .9399962   4.294792   6.908223   68.73359 
  gini_gross |        12         12    46.2627   9.992084   3.161026   41.08452   50.59736   555.1524 
     GCF_GDP |        12         12   21.80476   1.797366   1.340659    19.4028   23.40121   261.6571 
    openness |        12         12   41.85982   509.9272   22.58157   17.99214   75.36983   502.3179 
        gpop |        12         12   1.064604   .0198128   .1407579   .9113054   1.279555   12.77525 
  expectancy |        12         12   77.02202    3.67003   1.915732   74.20146   80.59814   924.2643 
    ln_GDPpc |        12         12   10.53225   .0391812   .1979425   10.23268   10.87669   126.3871 

             |  e(count)   e(sum_w)    e(mean)     e(Var)      e(sd)     e(min)     e(max)     e(sum) 
-------------+----------------------------------------------------------------------------------------
      ggdppc |        30         30   2.890783   1.606147   1.267338   .5284888   5.346528   86.72349 
      yr_sch |        30         30   4.405911   6.459973   2.541648   .9853624   10.31223   132.1773 
  yr_sch_pri |        30         30   2.743199   2.690486    1.64027   .6378934   5.947481   82.29598 
 yr_sch_post |        30         30   1.662711   1.030702   1.015235   .3474689   4.429233   49.88133 
  gini_gross |        30         30   40.36197   16.33859   4.042103    34.4956   48.74657   1210.859 
     GCF_GDP |        30         30   23.01262   26.98309   5.194525   15.64713   39.21136   690.3787 
    openness |        30         30   39.54755   392.8924   19.82151   13.27254   80.13788   1186.426 
        gpop |        30         30   2.000095   .5479009   .7402033   .6550672   3.724024   60.00284 
  expectancy |        30         30   61.65171   35.33375    5.94422    49.2158     72.347   1849.551 
    ln_GDPpc |        30         30   6.644334    .270811   .5203951   5.857604   7.842228     199.33 

             |  e(count)   e(sum_w)    e(mean)     e(Var)      e(sd)     e(min)     e(max)     e(sum) 
-------------+----------------------------------------------------------------------------------------
      ggdppc |        87         87   1.415186   10.44945   3.232561  -11.75201   12.73672   123.1212 
      yr_sch |        87         87   4.529899   3.509423   1.873345   1.269743      9.222   394.1012 
  yr_sch_pri |        87         87   3.440834   1.542717   1.242062   .9635113   6.053512   299.3526 
 yr_sch_post |        87         87   1.089064   .6959333   .8342262   .1572607   3.168488   94.74861 
  gini_gross |        87         87   49.98838   62.31048   7.893699   36.68353    71.5221   4348.989 
     GCF_GDP |        64         64   18.46678   43.30231   6.580449   3.958171   32.50056   1181.874 
    openness |        68         68   58.75732   953.6055    30.8805   14.38212   161.6901   3995.497 
        gpop |        87         87   2.404101   1.158884   1.076515  -1.123147   4.485131   209.1568 
  expectancy |        87         87   54.30507   51.96244   7.208498    38.6996   72.57766   4724.541 
    ln_GDPpc |        87         87   7.057787   .7071432   .8409181   5.698755   8.878685   614.0275 

. 
. esttab R_EAS R_ECS R_LCN R_MEA R_NAC R_SAS R_SSF using "$TABLES/TableA3.rtf", replace ///
>     cells("mean(fmt(2))") collabels(none) ///
>     mgroups("EAP" "ECA" "LAC" "MENA" "NA" "SA" "SSA", pattern(1 1 1 1 1 1 1)) ///
>     nonumber nomtitle noobs label title("Table A.3: Summary Statistics by Region")
(file C:\Users\meney\OneDrive\Manuscripts\HCI_2025/output/tables/TableA3.rtf not found)
(output written to C:\Users\meney\OneDrive\Manuscripts\HCI_2025/output/tables/TableA3.rtf)

.         
. /*******************************************************************************
>  9. TABLE 3: BASELINE FIXED EFFECTS
> ********************************************************************************/ 
. 
. xtreg ggdppc l_yr_sch i.period, fe vce(cluster id)

Fixed-effects (within) regression               Number of obs     =        449
Group variable: id                              Number of groups  =         97

R-squared:                                      Obs per group:
     Within  = 0.1287                                         min =          4
     Between = 0.0088                                         avg =        4.6
     Overall = 0.0980                                         max =          5

                                                F(5, 96)          =       4.73
corr(u_i, Xb) = -0.0112                         Prob > F          =     0.0007

                                    (Std. err. adjusted for 97 clusters in id)
------------------------------------------------------------------------------
             |               Robust
      ggdppc | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
    l_yr_sch |   .0354067   .4115069     0.09   0.932     -.781428    .8522415
             |
      period |
       1990  |  -1.894698   .5712531    -3.32   0.001    -3.028627   -.7607701
       1995  |   .7294403   .5266111     1.39   0.169    -.3158744    1.774755
       2000  |   1.180234   .7461136     1.58   0.117    -.3007903    2.661257
       2005  |   .6414454   .8920581     0.72   0.474    -1.129276    2.412167
             |
       _cons |   1.636702   2.627757     0.62   0.535    -3.579355    6.852758
-------------+----------------------------------------------------------------
     sigma_u |   1.718352
     sigma_e |  3.3668609
         rho |  .20665126   (fraction of variance due to u_i)
------------------------------------------------------------------------------

. est store T2_1

. 
. xtreg ggdppc l_yr_sch $CONTROLS i.period, fe vce(cluster id)

Fixed-effects (within) regression               Number of obs     =        398
Group variable: id                              Number of groups  =         90

R-squared:                                      Obs per group:
     Within  = 0.5653                                         min =          1
     Between = 0.0209                                         avg =        4.4
     Overall = 0.0289                                         max =          5

                                                F(10, 89)         =      13.50
corr(u_i, Xb) = -0.9815                         Prob > F          =     0.0000

                                    (Std. err. adjusted for 90 clusters in id)
------------------------------------------------------------------------------
             |               Robust
      ggdppc | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
    l_yr_sch |   .5256873   .2343065     2.24   0.027     .0601253    .9912494
     GCF_GDP |   .0487254   .0388462     1.25   0.213    -.0284612    .1259119
    openness |   .0308358   .0086415     3.57   0.001     .0136653    .0480063
        gpop |   .1211056   .3579019     0.34   0.736    -.5900379    .8322491
  expectancy |    .200777   .0844031     2.38   0.020     .0330699    .3684841
  l_ln_GDPpc |   -11.6951   1.615859    -7.24   0.000    -14.90578   -8.484424
             |
      period |
       1990  |  -.2476154   .3142534    -0.79   0.433    -.8720302    .3767993
       1995  |     1.2561   .4091177     3.07   0.003     .4431917    2.069008
       2000  |   1.893022   .6056574     3.13   0.002      .689594    3.096451
       2005  |   1.890425   .7753249     2.44   0.017     .3498712    3.430979
             |
       _cons |   80.85522    15.0992     5.35   0.000     50.85342     110.857
-------------+----------------------------------------------------------------
     sigma_u |  13.689933
     sigma_e |  1.9436123
         rho |  .98024169   (fraction of variance due to u_i)
------------------------------------------------------------------------------

. est store T2_2

. 
. esttab T2_1 T2_2 using "$TABLES/Table2.rtf", replace $ESTOPT ///
>     order(l_yr_sch $CONTROLS) ///
>     title("Table 2: Baseline Fixed-Effects Estimates")
(file C:\Users\meney\OneDrive\Manuscripts\HCI_2025/output/tables/Table2.rtf not found)
(output written to C:\Users\meney\OneDrive\Manuscripts\HCI_2025/output/tables/Table2.rtf)

.         
. /*******************************************************************************
>  10. TABLE 4: INEQUALITY QUARTILES INTERACTION + FIGURE
> ********************************************************************************/
. *xtile gini_q = gini_gross, n(4)
. xtile gini_q = l_gini_gross, nq(4)

. label define gq 1 "Q1 (Lowest)" 2 "Q2" 3 "Q3" 4 "Q4 (Highest)"

. label values gini_q gq

. 
. * Interaction model
. xtreg ggdppc c.l_yr_sch##i.gini_q $CONTROLS i.period, fe vce(cluster id)

Fixed-effects (within) regression               Number of obs     =        398
Group variable: id                              Number of groups  =         90

R-squared:                                      Obs per group:
     Within  = 0.6129                                         min =          1
     Between = 0.0141                                         avg =        4.4
     Overall = 0.0235                                         max =          5

                                                F(16, 89)         =      11.90
corr(u_i, Xb) = -0.9835                         Prob > F          =     0.0000

                                         (Std. err. adjusted for 90 clusters in id)
-----------------------------------------------------------------------------------
                  |               Robust
           ggdppc | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
------------------+----------------------------------------------------------------
         l_yr_sch |   1.023168   .3497486     2.93   0.004     .3282248    1.718111
                  |
           gini_q |
              Q2  |    4.97157   3.131291     1.59   0.116    -1.250239    11.19338
              Q3  |   5.249425   3.173838     1.65   0.102    -1.056922    11.55577
    Q4 (Highest)  |   12.65064    4.80411     2.63   0.010     3.104972     22.1963
                  |
gini_q#c.l_yr_sch |
              Q2  |  -.4635876   .3226823    -1.44   0.154    -1.104751    .1775754
              Q3  |  -.5686005   .3360412    -1.69   0.094    -1.236307    .0991062
    Q4 (Highest)  |  -1.341269   .4998389    -2.68   0.009    -2.334438   -.3480999
                  |
          GCF_GDP |   .0635627   .0336145     1.89   0.062    -.0032285     .130354
         openness |   .0308058   .0092029     3.35   0.001     .0125199    .0490918
             gpop |  -.0188511   .2469674    -0.08   0.939    -.5095701    .4718678
       expectancy |   .0544754    .080863     0.67   0.502    -.1061978    .2151485
       l_ln_GDPpc |  -11.76075   1.342151    -8.76   0.000    -14.42758   -9.093927
                  |
           period |
            1990  |   .0531382   .3276626     0.16   0.872    -.5979204    .7041967
            1995  |   1.746676   .4990047     3.50   0.001     .7551639    2.738187
            2000  |   2.713375   .6956481     3.90   0.000     1.331137    4.095613
            2005  |   3.010878   .8447971     3.56   0.001     1.332284    4.689472
                  |
            _cons |   85.79333    13.2524     6.47   0.000      59.4611    112.1256
------------------+----------------------------------------------------------------
          sigma_u |  14.953413
          sigma_e |  1.8529953
              rho |  .98487659   (fraction of variance due to u_i)
-----------------------------------------------------------------------------------

. est store interq_total

. 
. xtreg ggdppc c.l_yr_sch_pri##i.gini_q $CONTROLS i.period, fe vce(cluster id)

Fixed-effects (within) regression               Number of obs     =        398
Group variable: id                              Number of groups  =         90

R-squared:                                      Obs per group:
     Within  = 0.6166                                         min =          1
     Between = 0.0185                                         avg =        4.4
     Overall = 0.0278                                         max =          5

                                                F(16, 89)         =      12.29
corr(u_i, Xb) = -0.9822                         Prob > F          =     0.0000

                                             (Std. err. adjusted for 90 clusters in id)
---------------------------------------------------------------------------------------
                      |               Robust
               ggdppc | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
----------------------+----------------------------------------------------------------
         l_yr_sch_pri |    1.77987   .6496266     2.74   0.007     .4890756    3.070664
                      |
               gini_q |
                  Q2  |   3.641047   2.499894     1.46   0.149    -1.326189    8.608283
                  Q3  |   4.132519   2.755552     1.50   0.137    -1.342705    9.607742
        Q4 (Highest)  |   14.21901   5.294849     2.69   0.009      3.69826    24.73976
                      |
gini_q#c.l_yr_sch_pri |
                  Q2  |  -.4373978   .3823513    -1.14   0.256    -1.197122    .3223262
                  Q3  |  -.6528706   .4620593    -1.41   0.161    -1.570973    .2652314
        Q4 (Highest)  |  -2.423227   .9012137    -2.69   0.009    -4.213919   -.6325342
                      |
              GCF_GDP |   .0546035   .0351018     1.56   0.123    -.0151431    .1243501
             openness |   .0357161    .009405     3.80   0.000     .0170285    .0544037
                 gpop |   .0254624   .2520095     0.10   0.920    -.4752751    .5261999
           expectancy |   .0499514   .0920948     0.54   0.589    -.1330391    .2329418
           l_ln_GDPpc |  -11.43132   1.454012    -7.86   0.000    -14.32041   -8.542225
                      |
               period |
                1990  |   .0684985   .3287255     0.21   0.835    -.5846722    .7216691
                1995  |   1.676731   .4490214     3.73   0.000      .784535    2.568927
                2000  |   2.648427   .6251791     4.24   0.000      1.40621    3.890645
                2005  |   2.937795    .816316     3.60   0.001     1.315793    4.559798
                      |
                _cons |   82.44114   14.48184     5.69   0.000     53.66603    111.2163
----------------------+----------------------------------------------------------------
              sigma_u |  14.384499
              sigma_e |  1.8441051
                  rho |   .9838303   (fraction of variance due to u_i)
---------------------------------------------------------------------------------------

. est store interq_pre

. 
. xtreg ggdppc c.l_yr_sch_post##i.gini_q $CONTROLS i.period, fe vce(cluster id)

Fixed-effects (within) regression               Number of obs     =        398
Group variable: id                              Number of groups  =         90

R-squared:                                      Obs per group:
     Within  = 0.5905                                         min =          1
     Between = 0.0127                                         avg =        4.4
     Overall = 0.0218                                         max =          5

                                                F(16, 89)         =      11.60
corr(u_i, Xb) = -0.9843                         Prob > F          =     0.0000

                                              (Std. err. adjusted for 90 clusters in id)
----------------------------------------------------------------------------------------
                       |               Robust
                ggdppc | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-----------------------+----------------------------------------------------------------
         l_yr_sch_post |   .8091777   .4748004     1.70   0.092    -.1342406    1.752596
                       |
                gini_q |
                   Q2  |   2.537645    1.67867     1.51   0.134     -.797837    5.873126
                   Q3  |    2.11592   1.604855     1.32   0.191    -1.072893    5.304733
         Q4 (Highest)  |   5.782556   2.754641     2.10   0.039     .3091427    11.25597
                       |
gini_q#c.l_yr_sch_post |
                   Q2  |  -.4808521   .4859385    -0.99   0.325    -1.446402    .4846974
                   Q3  |  -.5363537   .4890796    -1.10   0.276    -1.508144    .4354371
         Q4 (Highest)  |  -1.425997   .7202237    -1.98   0.051    -2.857066    .0050725
                       |
               GCF_GDP |   .0577626   .0363098     1.59   0.115    -.0143842    .1299095
              openness |    .027526   .0096804     2.84   0.006     .0082913    .0467606
                  gpop |    .000702   .2717408     0.00   0.998    -.5392412    .5406452
            expectancy |   .1153558   .0785275     1.47   0.145    -.0406766    .2713882
            l_ln_GDPpc |  -11.71989   1.438622    -8.15   0.000     -14.5784   -8.861374
                       |
                period |
                 1990  |   .1091849   .3336073     0.33   0.744    -.5536857    .7720556
                 1995  |   1.962384   .5291392     3.71   0.000     .9109961    3.013773
                 2000  |    2.94618   .7422561     3.97   0.000     1.471333    4.421027
                 2005  |   3.260431   .9116645     3.58   0.001     1.448973    5.071889
                       |
                 _cons |   87.06535   13.61403     6.40   0.000     60.01456    114.1161
-----------------------+----------------------------------------------------------------
               sigma_u |  15.101725
               sigma_e |  1.9057852
                   rho |  .98432409   (fraction of variance due to u_i)
----------------------------------------------------------------------------------------

. est store interq_post

. 
. esttab interq_total interq_pre interq_post using "$TABLES/Table3.rtf", replace se r2 label star(* 0.10 ** 0.05 *** 0.01) b(%9.3f) se(%9.3f) nomtitles
>  nogaps compress ///
>        keep( ///
>         l_yr_sch ///
>         l_yr_sch_pri ///
>         l_yr_sch_post ///
>         2.gini_q 3.gini_q 4.gini_q ///
>         2.gini_q#c.l_yr_sch 3.gini_q#c.l_yr_sch 4.gini_q#c.l_yr_sch ///
>         2.gini_q#c.l_yr_sch_pri 3.gini_q#c.l_yr_sch_pri 4.gini_q#c.l_yr_sch_pri ///
>         2.gini_q#c.l_yr_sch_post 3.gini_q#c.l_yr_sch_post 4.gini_q#c.l_yr_sch_post ///
>         GCF_GDP openness gpop expectancy l_ln_GDPpc ///
>         _cons ///
>     ) ///
>     coeflabels( ///
>         l_yr_sch "Mean years of schooling" ///
>         l_yr_sch_pri "Primary schooling" ///
>         l_yr_sch_post "Post-primary schooling" ///
>         2.gini_q "Q2" ///
>         3.gini_q "Q3" ///
>         4.gini_q "Q4" ///
>         2.gini_q#c.l_yr_sch "Q2 × Mean years of schooling" ///
>         3.gini_q#c.l_yr_sch "Q3 × Mean years of schooling" ///
>         4.gini_q#c.l_yr_sch "Q4 × Mean years of schooling" ///
>         2.gini_q#c.l_yr_sch_pri "Q2 × Primary schooling" ///
>         3.gini_q#c.l_yr_sch_pri "Q3 × Primary schooling" ///
>         4.gini_q#c.l_yr_sch_pri "Q4 × Primary schooling" ///
>         2.gini_q#c.l_yr_sch_post "Q2 × Post-primary schooling" ///
>         3.gini_q#c.l_yr_sch_post "Q3 × Post-primary schooling" ///
>         4.gini_q#c.l_yr_sch_post "Q4 × Post-primary schooling" ///
>         GCF_GDP "Investment share of GDP (%)" ///
>         openness "Trade openness (% of GDP)" ///
>         gpop "Population growth rate (%)" ///
>         expectancy "Life expectancy" ///
>         l_ln_GDPpc "Initial GDP per capita" ///
>         _cons "Constant" ///
>     ) ///
>     refcat( ///
>         l_yr_sch "Schooling" ///
>         2.gini_q "Inequality Quartile" ///
>         2.gini_q#c.l_yr_sch "Schooling × Inequality Quartiles" ///
>         GCF_GDP "Controls", ///
>         nolabel ///
>     ) ///
>     order( ///
>         l_yr_sch l_yr_sch_pri l_yr_sch_post ///
>         2.gini_q 3.gini_q 4.gini_q ///
>         2.gini_q#c.l_yr_sch 3.gini_q#c.l_yr_sch 4.gini_q#c.l_yr_sch ///
>         2.gini_q#c.l_yr_sch_pri 3.gini_q#c.l_yr_sch_pri 4.gini_q#c.l_yr_sch_pri ///
>         2.gini_q#c.l_yr_sch_post 3.gini_q#c.l_yr_sch_post 4.gini_q#c.l_yr_sch_post ///
>         GCF_GDP openness gpop expectancy l_ln_GDPpc _cons ///
>     ) ///
>     title("Table 3: Schooling Returns across Inequality Quartiles")
(file C:\Users\meney\OneDrive\Manuscripts\HCI_2025/output/tables/Table3.rtf not found)
(output written to C:\Users\meney\OneDrive\Manuscripts\HCI_2025/output/tables/Table3.rtf)

. 
. * Figure 2: Marginal effects by quartile
. ********************************************************************************
. xtreg ggdppc c.l_yr_sch##i.gini_q GCF_GDP openness gpop expectancy l_ln_GDPpc i.period, fe vce(cluster id)

Fixed-effects (within) regression               Number of obs     =        398
Group variable: id                              Number of groups  =         90

R-squared:                                      Obs per group:
     Within  = 0.6129                                         min =          1
     Between = 0.0141                                         avg =        4.4
     Overall = 0.0235                                         max =          5

                                                F(16, 89)         =      11.90
corr(u_i, Xb) = -0.9835                         Prob > F          =     0.0000

                                         (Std. err. adjusted for 90 clusters in id)
-----------------------------------------------------------------------------------
                  |               Robust
           ggdppc | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
------------------+----------------------------------------------------------------
         l_yr_sch |   1.023168   .3497486     2.93   0.004     .3282248    1.718111
                  |
           gini_q |
              Q2  |    4.97157   3.131291     1.59   0.116    -1.250239    11.19338
              Q3  |   5.249425   3.173838     1.65   0.102    -1.056922    11.55577
    Q4 (Highest)  |   12.65064    4.80411     2.63   0.010     3.104972     22.1963
                  |
gini_q#c.l_yr_sch |
              Q2  |  -.4635876   .3226823    -1.44   0.154    -1.104751    .1775754
              Q3  |  -.5686005   .3360412    -1.69   0.094    -1.236307    .0991062
    Q4 (Highest)  |  -1.341269   .4998389    -2.68   0.009    -2.334438   -.3480999
                  |
          GCF_GDP |   .0635627   .0336145     1.89   0.062    -.0032285     .130354
         openness |   .0308058   .0092029     3.35   0.001     .0125199    .0490918
             gpop |  -.0188511   .2469674    -0.08   0.939    -.5095701    .4718678
       expectancy |   .0544754    .080863     0.67   0.502    -.1061978    .2151485
       l_ln_GDPpc |  -11.76075   1.342151    -8.76   0.000    -14.42758   -9.093927
                  |
           period |
            1990  |   .0531382   .3276626     0.16   0.872    -.5979204    .7041967
            1995  |   1.746676   .4990047     3.50   0.001     .7551639    2.738187
            2000  |   2.713375   .6956481     3.90   0.000     1.331137    4.095613
            2005  |   3.010878   .8447971     3.56   0.001     1.332284    4.689472
                  |
            _cons |   85.79333    13.2524     6.47   0.000      59.4611    112.1256
------------------+----------------------------------------------------------------
          sigma_u |  14.953413
          sigma_e |  1.8529953
              rho |  .98487659   (fraction of variance due to u_i)
-----------------------------------------------------------------------------------

. margins gini_q, dydx(l_yr_sch)

Average marginal effects                                   Number of obs = 398
Model VCE: Robust

Expression: Linear prediction, predict()
dy/dx wrt:  l_yr_sch

-------------------------------------------------------------------------------
              |            Delta-method
              |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
--------------+----------------------------------------------------------------
l_yr_sch      |
       gini_q |
 Q1 (Lowest)  |   1.023168   .3497486     2.93   0.003     .3376731    1.708663
          Q2  |   .5595802   .2663207     2.10   0.036     .0376013    1.081559
          Q3  |   .4545673   .3059197     1.49   0.137    -.1450242    1.054159
Q4 (Highest)  |  -.3181013   .3974297    -0.80   0.423    -1.097049    .4608466
-------------------------------------------------------------------------------

. matrix M_total = r(b)

. 
. xtreg ggdppc c.l_yr_sch_pri##i.gini_q GCF_GDP openness gpop expectancy l_ln_GDPpc i.period, fe vce(cluster id)

Fixed-effects (within) regression               Number of obs     =        398
Group variable: id                              Number of groups  =         90

R-squared:                                      Obs per group:
     Within  = 0.6166                                         min =          1
     Between = 0.0185                                         avg =        4.4
     Overall = 0.0278                                         max =          5

                                                F(16, 89)         =      12.29
corr(u_i, Xb) = -0.9822                         Prob > F          =     0.0000

                                             (Std. err. adjusted for 90 clusters in id)
---------------------------------------------------------------------------------------
                      |               Robust
               ggdppc | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
----------------------+----------------------------------------------------------------
         l_yr_sch_pri |    1.77987   .6496266     2.74   0.007     .4890756    3.070664
                      |
               gini_q |
                  Q2  |   3.641047   2.499894     1.46   0.149    -1.326189    8.608283
                  Q3  |   4.132519   2.755552     1.50   0.137    -1.342705    9.607742
        Q4 (Highest)  |   14.21901   5.294849     2.69   0.009      3.69826    24.73976
                      |
gini_q#c.l_yr_sch_pri |
                  Q2  |  -.4373978   .3823513    -1.14   0.256    -1.197122    .3223262
                  Q3  |  -.6528706   .4620593    -1.41   0.161    -1.570973    .2652314
        Q4 (Highest)  |  -2.423227   .9012137    -2.69   0.009    -4.213919   -.6325342
                      |
              GCF_GDP |   .0546035   .0351018     1.56   0.123    -.0151431    .1243501
             openness |   .0357161    .009405     3.80   0.000     .0170285    .0544037
                 gpop |   .0254624   .2520095     0.10   0.920    -.4752751    .5261999
           expectancy |   .0499514   .0920948     0.54   0.589    -.1330391    .2329418
           l_ln_GDPpc |  -11.43132   1.454012    -7.86   0.000    -14.32041   -8.542225
                      |
               period |
                1990  |   .0684985   .3287255     0.21   0.835    -.5846722    .7216691
                1995  |   1.676731   .4490214     3.73   0.000      .784535    2.568927
                2000  |   2.648427   .6251791     4.24   0.000      1.40621    3.890645
                2005  |   2.937795    .816316     3.60   0.001     1.315793    4.559798
                      |
                _cons |   82.44114   14.48184     5.69   0.000     53.66603    111.2163
----------------------+----------------------------------------------------------------
              sigma_u |  14.384499
              sigma_e |  1.8441051
                  rho |   .9838303   (fraction of variance due to u_i)
---------------------------------------------------------------------------------------

. margins gini_q, dydx(l_yr_sch_pri)

Average marginal effects                                   Number of obs = 398
Model VCE: Robust

Expression: Linear prediction, predict()
dy/dx wrt:  l_yr_sch_pri

-------------------------------------------------------------------------------
              |            Delta-method
              |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
--------------+----------------------------------------------------------------
l_yr_sch_pri  |
       gini_q |
 Q1 (Lowest)  |    1.77987   .6496266     2.74   0.006      .506625    3.053115
          Q2  |   1.342472   .5917973     2.27   0.023     .1825705    2.502373
          Q3  |   1.126999   .7173649     1.57   0.116    -.2790103    2.533009
Q4 (Highest)  |  -.6433569   .5503124    -1.17   0.242    -1.721949    .4352355
-------------------------------------------------------------------------------

. matrix M_pri = r(b)

. 
. xtreg ggdppc c.l_yr_sch_post##i.gini_q GCF_GDP openness gpop expectancy l_ln_GDPpc i.period, fe vce(cluster id)

Fixed-effects (within) regression               Number of obs     =        398
Group variable: id                              Number of groups  =         90

R-squared:                                      Obs per group:
     Within  = 0.5905                                         min =          1
     Between = 0.0127                                         avg =        4.4
     Overall = 0.0218                                         max =          5

                                                F(16, 89)         =      11.60
corr(u_i, Xb) = -0.9843                         Prob > F          =     0.0000

                                              (Std. err. adjusted for 90 clusters in id)
----------------------------------------------------------------------------------------
                       |               Robust
                ggdppc | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-----------------------+----------------------------------------------------------------
         l_yr_sch_post |   .8091777   .4748004     1.70   0.092    -.1342406    1.752596
                       |
                gini_q |
                   Q2  |   2.537645    1.67867     1.51   0.134     -.797837    5.873126
                   Q3  |    2.11592   1.604855     1.32   0.191    -1.072893    5.304733
         Q4 (Highest)  |   5.782556   2.754641     2.10   0.039     .3091427    11.25597
                       |
gini_q#c.l_yr_sch_post |
                   Q2  |  -.4808521   .4859385    -0.99   0.325    -1.446402    .4846974
                   Q3  |  -.5363537   .4890796    -1.10   0.276    -1.508144    .4354371
         Q4 (Highest)  |  -1.425997   .7202237    -1.98   0.051    -2.857066    .0050725
                       |
               GCF_GDP |   .0577626   .0363098     1.59   0.115    -.0143842    .1299095
              openness |    .027526   .0096804     2.84   0.006     .0082913    .0467606
                  gpop |    .000702   .2717408     0.00   0.998    -.5392412    .5406452
            expectancy |   .1153558   .0785275     1.47   0.145    -.0406766    .2713882
            l_ln_GDPpc |  -11.71989   1.438622    -8.15   0.000     -14.5784   -8.861374
                       |
                period |
                 1990  |   .1091849   .3336073     0.33   0.744    -.5536857    .7720556
                 1995  |   1.962384   .5291392     3.71   0.000     .9109961    3.013773
                 2000  |    2.94618   .7422561     3.97   0.000     1.471333    4.421027
                 2005  |   3.260431   .9116645     3.58   0.001     1.448973    5.071889
                       |
                 _cons |   87.06535   13.61403     6.40   0.000     60.01456    114.1161
-----------------------+----------------------------------------------------------------
               sigma_u |  15.101725
               sigma_e |  1.9057852
                   rho |  .98432409   (fraction of variance due to u_i)
----------------------------------------------------------------------------------------

. margins gini_q, dydx(l_yr_sch_post)

Average marginal effects                                   Number of obs = 398
Model VCE: Robust

Expression: Linear prediction, predict()
dy/dx wrt:  l_yr_sch_post

-------------------------------------------------------------------------------
              |            Delta-method
              |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
--------------+----------------------------------------------------------------
l_yr_sch_post |
       gini_q |
 Q1 (Lowest)  |   .8091777   .4748004     1.70   0.088     -.121414    1.739769
          Q2  |   .3283256   .4155319     0.79   0.429     -.486102    1.142753
          Q3  |    .272824   .4258158     0.64   0.522    -.5617596    1.107408
Q4 (Highest)  |   -.616819   .7071066    -0.87   0.383    -2.002723    .7690845
-------------------------------------------------------------------------------

. matrix M_post = r(b)

. 
. * --- Put results into a dataset ---
. clear

. set obs 4
Number of observations (_N) was 0, now 4.

. gen quartile = _n

. gen total   = .
(4 missing values generated)

. gen primary = .
(4 missing values generated)

. gen post    = .
(4 missing values generated)

. 
. forvalues i=1/4 {
  2.     replace total   = M_total[1,`i'] in `i'
  3.     replace primary = M_pri[1,`i']   in `i'
  4.     replace post    = M_post[1,`i']  in `i'
  5. }
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

. 
. * --- Overlay plot ---
. twoway (line total quartile, lcolor(navy) lpattern(solid) lwidth(medthick)) ///
>        (line primary quartile, lcolor(maroon) lpattern(dash) lwidth(medthick)) ///
>        (line post quartile, lcolor(forest_green) lpattern(dash) lwidth(medium)), ///
>        legend(order(1 "Total" 2 "Primary" 3 "Post-primary") rows(1) pos(6)) ///
>        ytitle("Marginal effect on growth") ///
>        xtitle("Inequality Quartile") ///
>        xlabel(1 "Q1" 2 "Q2" 3 "Q3" 4 "Q4") ///
>        title("") ///
>            graphregion(color(white)) plotregion(color(white))

.            graph export "$FIGS/MarginalEffect.emf", replace
(file C:\Users\meney\OneDrive\Manuscripts\HCI_2025/output/figures/MarginalEffect.emf not found)
file C:\Users\meney\OneDrive\Manuscripts\HCI_2025/output/figures/MarginalEffect.emf saved as Enhanced Metafile format

.                 
.                 
. 
. 
. /*******************************************************************************
> *ROBUSTNESS CHECKS AND EXTERNAL VALIDITY (APPENDIX TABLES )
> ********************************************************************************/
. 
. ********************************************************************************
. *12 TABLE A.4: SCHOOLING LEVELS (PRIMARY AND POST PRIMARY)  
. ********************************************************************************
. use "$CLEAN/HCI_data_final.dta", clear

. 
. xtset id period, delta(5) 

Panel variable: id (unbalanced)
 Time variable: period, 1980 to 2005
         Delta: 5 units

. 
. xtreg ggdppc l_yr_sch $CONTROLS  i.period, fe vce(cluster id)  

Fixed-effects (within) regression               Number of obs     =        398
Group variable: id                              Number of groups  =         90

R-squared:                                      Obs per group:
     Within  = 0.5653                                         min =          1
     Between = 0.0209                                         avg =        4.4
     Overall = 0.0289                                         max =          5

                                                F(10, 89)         =      13.50
corr(u_i, Xb) = -0.9815                         Prob > F          =     0.0000

                                    (Std. err. adjusted for 90 clusters in id)
------------------------------------------------------------------------------
             |               Robust
      ggdppc | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
    l_yr_sch |   .5256873   .2343065     2.24   0.027     .0601253    .9912494
     GCF_GDP |   .0487254   .0388462     1.25   0.213    -.0284612    .1259119
    openness |   .0308358   .0086415     3.57   0.001     .0136653    .0480063
        gpop |   .1211056   .3579019     0.34   0.736    -.5900379    .8322491
  expectancy |    .200777   .0844031     2.38   0.020     .0330699    .3684841
  l_ln_GDPpc |   -11.6951   1.615859    -7.24   0.000    -14.90578   -8.484424
             |
      period |
       1990  |  -.2476154   .3142534    -0.79   0.433    -.8720302    .3767993
       1995  |     1.2561   .4091177     3.07   0.003     .4431917    2.069008
       2000  |   1.893022   .6056574     3.13   0.002      .689594    3.096451
       2005  |   1.890425   .7753249     2.44   0.017     .3498712    3.430979
             |
       _cons |   80.85522    15.0992     5.35   0.000     50.85342     110.857
-------------+----------------------------------------------------------------
     sigma_u |  13.689933
     sigma_e |  1.9436123
         rho |  .98024169   (fraction of variance due to u_i)
------------------------------------------------------------------------------

. est store m1

. 
. xtreg ggdppc l_yr_sch_pri $CONTROLS  i.period, fe vce(cluster id)

Fixed-effects (within) regression               Number of obs     =        398
Group variable: id                              Number of groups  =         90

R-squared:                                      Obs per group:
     Within  = 0.5635                                         min =          1
     Between = 0.0209                                         avg =        4.4
     Overall = 0.0287                                         max =          5

                                                F(10, 89)         =      12.84
corr(u_i, Xb) = -0.9819                         Prob > F          =     0.0000

                                    (Std. err. adjusted for 90 clusters in id)
------------------------------------------------------------------------------
             |               Robust
      ggdppc | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
l_yr_sch_pri |   .6500959   .4304663     1.51   0.135    -.2052315    1.505423
     GCF_GDP |   .0422256   .0403162     1.05   0.298    -.0378819     .122333
    openness |   .0325057   .0087234     3.73   0.000     .0151725    .0498389
        gpop |   .1445666   .3704641     0.39   0.697    -.5915376    .8806708
  expectancy |   .1871685   .0849377     2.20   0.030     .0183991    .3559379
  l_ln_GDPpc |  -11.50831   1.632791    -7.05   0.000    -14.75263   -8.263992
             |
      period |
       1990  |  -.1155819   .3253397    -0.36   0.723    -.7620249    .5308611
       1995  |   1.487662   .4298548     3.46   0.001     .6335497    2.341774
       2000  |   2.293424   .6111859     3.75   0.000     1.079011    3.507838
       2005  |   2.434899   .8102665     3.01   0.003     .8249165    4.044881
             |
       _cons |    80.8263    15.7361     5.14   0.000     49.55901    112.0936
-------------+----------------------------------------------------------------
     sigma_u |  13.809302
     sigma_e |  1.9476866
         rho |  .98049526   (fraction of variance due to u_i)
------------------------------------------------------------------------------

. est store m2

. 
. xtreg ggdppc l_yr_sch_post $CONTROLS i.period, fe vce(cluster id)

Fixed-effects (within) regression               Number of obs     =        398
Group variable: id                              Number of groups  =         90

R-squared:                                      Obs per group:
     Within  = 0.5621                                         min =          1
     Between = 0.0175                                         avg =        4.4
     Overall = 0.0257                                         max =          5

                                                F(10, 89)         =      13.03
corr(u_i, Xb) = -0.9831                         Prob > F          =     0.0000

                                     (Std. err. adjusted for 90 clusters in id)
-------------------------------------------------------------------------------
              |               Robust
       ggdppc | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
l_yr_sch_post |   .4100453   .4179794     0.98   0.329    -.4204708    1.240562
      GCF_GDP |   .0503108   .0390779     1.29   0.201    -.0273362    .1279578
     openness |   .0302253   .0087297     3.46   0.001     .0128795    .0475711
         gpop |   .0871133   .3494804     0.25   0.804    -.6072969    .7815235
   expectancy |   .2064623   .0877317     2.35   0.021     .0321412    .3807834
   l_ln_GDPpc |  -11.74335   1.646409    -7.13   0.000    -15.01472   -8.471967
              |
       period |
        1990  |  -.1372699   .3217747    -0.43   0.671    -.7766293    .5020895
        1995  |   1.512643   .4297842     3.52   0.001     .6586711    2.366615
        2000  |   2.297868   .6382953     3.60   0.001     1.029589    3.566147
        2005  |   2.411323   .8202655     2.94   0.004     .7814732    4.041173
              |
        _cons |   83.32264   15.20795     5.48   0.000     53.10477    113.5405
--------------+----------------------------------------------------------------
      sigma_u |  14.281345
      sigma_e |  1.9507716
          rho |  .98168335   (fraction of variance due to u_i)
-------------------------------------------------------------------------------

. est store m3

. 
. esttab m1 m2 m3 using "$TABLES/TableA4.rtf", replace $ESTOPT ///
> order(l_yr_sch l_yr_sch_pri l_yr_sch_post $CONTROLS) ///
> title("Table A.4: Fixed-Effects Estimates of Mean Years of Schooling on Economic Growth by Schooling Levels")
(file C:\Users\meney\OneDrive\Manuscripts\HCI_2025/output/tables/TableA4.rtf not found)
(output written to C:\Users\meney\OneDrive\Manuscripts\HCI_2025/output/tables/TableA4.rtf)

.                 
.                 
. /*******************************************************************************
>  13. APPENDIX TABLE A.5: CONTINUOUS INTERACTIONS 
> ********************************************************************************/
. gen int_mys_gini  = l_yr_sch      * l_gini_gross
(97 missing values generated)

. gen int_pri_gini  = l_yr_sch_pri  * l_gini_gross
(97 missing values generated)

. gen int_post_gini = l_yr_sch_post * l_gini_gross
(97 missing values generated)

. 
. label var l_gini_gross "GINI"

. label var int_mys_gini  "Mean years of schooling*GINI"

. label var int_pri_gini  "Primary schooling years*GINI"

. label var int_post_gini "Post-primary schooling years*GINI"

. 
. xtreg ggdppc l_yr_sch l_gini_gross int_mys_gini $CONTROLS i.period, fe vce(cluster id)

Fixed-effects (within) regression               Number of obs     =        398
Group variable: id                              Number of groups  =         90

R-squared:                                      Obs per group:
     Within  = 0.5937                                         min =          1
     Between = 0.0160                                         avg =        4.4
     Overall = 0.0246                                         max =          5

                                                F(12, 89)         =      16.28
corr(u_i, Xb) = -0.9828                         Prob > F          =     0.0000

                                    (Std. err. adjusted for 90 clusters in id)
------------------------------------------------------------------------------
             |               Robust
      ggdppc | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
    l_yr_sch |   3.657153    1.45617     2.51   0.014     .7637735    6.550532
l_gini_gross |   .7479036   .3436143     2.18   0.032     .0651492    1.430658
int_mys_gini |  -.0637454   .0302871    -2.10   0.038    -.1239253   -.0035656
     GCF_GDP |   .0542597   .0391428     1.39   0.169    -.0235163    .1320357
    openness |   .0295469   .0084953     3.48   0.001     .0126668    .0464269
        gpop |   .0668042   .3534823     0.19   0.851    -.6355576     .769166
  expectancy |   .1135492    .095099     1.19   0.236    -.0754105    .3025089
  l_ln_GDPpc |  -12.12766   1.193474   -10.16   0.000    -14.49907   -9.756251
             |
      period |
       1990  |  -.2928618   .3326058    -0.88   0.381    -.9537424    .3680189
       1995  |   1.100345   .4435389     2.48   0.015     .2190425    1.981647
       2000  |   1.608087   .6830132     2.35   0.021     .2509542    2.965219
       2005  |   1.645646    .842241     1.95   0.054     -.027869    3.319161
             |
       _cons |   55.11562   20.68275     2.66   0.009     14.01944     96.2118
-------------+----------------------------------------------------------------
     sigma_u |  14.529627
     sigma_e |  1.8854494
         rho |  .98343969   (fraction of variance due to u_i)
------------------------------------------------------------------------------

. est store A8_1

. 
. xtreg ggdppc l_yr_sch_pri l_gini_gross int_pri_gini $CONTROLS i.period, fe vce(cluster id)

Fixed-effects (within) regression               Number of obs     =        398
Group variable: id                              Number of groups  =         90

R-squared:                                      Obs per group:
     Within  = 0.5922                                         min =          1
     Between = 0.0212                                         avg =        4.4
     Overall = 0.0294                                         max =          5

                                                F(12, 89)         =      13.54
corr(u_i, Xb) = -0.9812                         Prob > F          =     0.0000

                                    (Std. err. adjusted for 90 clusters in id)
------------------------------------------------------------------------------
             |               Robust
      ggdppc | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
l_yr_sch_pri |   5.909342   2.340288     2.53   0.013      1.25924    10.55944
l_gini_gross |   .7692168   .3307247     2.33   0.022     .1120739     1.42636
int_pri_gini |  -.1024001   .0447152    -2.29   0.024    -.1912483   -.0135519
     GCF_GDP |   .0419517   .0404149     1.04   0.302    -.0383519    .1222553
    openness |   .0342975   .0085631     4.01   0.000     .0172828    .0513122
        gpop |   .1233953   .3698693     0.33   0.739    -.6115271    .8583178
  expectancy |   .1206763   .0934525     1.29   0.200    -.0650118    .3063645
  l_ln_GDPpc |  -11.57798   1.334374    -8.68   0.000    -14.22935   -8.926605
             |
      period |
       1990  |  -.2206527   .3531943    -0.62   0.534    -.9224423    .4811368
       1995  |   1.145985   .4952798     2.31   0.023      .161875    2.130096
       2000  |   1.726705   .7296503     2.37   0.020     .2769052    3.176504
       2005  |    1.81927   .9163189     1.99   0.050    -.0014364    3.639976
             |
       _cons |   48.63056   22.76442     2.14   0.035     3.398138    93.86297
-------------+----------------------------------------------------------------
     sigma_u |  13.827108
     sigma_e |  1.8890404
         rho |  .98167734   (fraction of variance due to u_i)
------------------------------------------------------------------------------

. est store A8_2

. 
. xtreg ggdppc l_yr_sch_post l_gini_gross int_post_gini $CONTROLS i.period, fe vce(cluster id)

Fixed-effects (within) regression               Number of obs     =        398
Group variable: id                              Number of groups  =         90

R-squared:                                      Obs per group:
     Within  = 0.5793                                         min =          1
     Between = 0.0128                                         avg =        4.4
     Overall = 0.0213                                         max =          5

                                                F(12, 89)         =      14.29
corr(u_i, Xb) = -0.9846                         Prob > F          =     0.0000

                                     (Std. err. adjusted for 90 clusters in id)
-------------------------------------------------------------------------------
              |               Robust
       ggdppc | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
l_yr_sch_post |   3.703166   2.250604     1.65   0.103     -.768735    8.175068
 l_gini_gross |   .4187078   .2513086     1.67   0.099     -.080637    .9180527
int_post_gini |  -.0732656   .0513537    -1.43   0.157    -.1753043    .0287732
      GCF_GDP |   .0546114   .0398744     1.37   0.174    -.0246182    .1338409
     openness |   .0282511   .0089111     3.17   0.002      .010545    .0459573
         gpop |   .0498764   .3430404     0.15   0.885    -.6317375    .7314903
   expectancy |   .1583057   .0897583     1.76   0.081    -.0200422    .3366536
   l_ln_GDPpc |  -12.09613   1.288718    -9.39   0.000    -14.65679   -9.535476
              |
       period |
        1990  |  -.1312537   .3351309    -0.39   0.696    -.7971516    .5346442
        1995  |   1.522853   .4557083     3.34   0.001       .61737    2.428335
        2000  |   2.258603   .6981411     3.24   0.002     .8714113    3.645794
        2005  |   2.451073   .8685737     2.82   0.006     .7252359    4.176911
              |
        _cons |   70.82359   18.01229     3.93   0.000     35.03355    106.6136
--------------+----------------------------------------------------------------
      sigma_u |  15.198269
      sigma_e |  1.9185719
          rho |  .98431438   (fraction of variance due to u_i)
-------------------------------------------------------------------------------

. est store A8_3

. 
. esttab A8_1 A8_2 A8_3 using "$TABLES/TableA5.rtf", replace $ESTOPT ///
>     order(l_yr_sch l_yr_sch_pri l_yr_sch_post int_mys_gini int_pri_gini int_post_gini l_gini_gross $CONTROLS)  title("Table A.5: Fixed-Effects Estima
> tes with Interactions between Continuous Schooling and Income Inequality")
(file C:\Users\meney\OneDrive\Manuscripts\HCI_2025/output/tables/TableA5.rtf not found)
(output written to C:\Users\meney\OneDrive\Manuscripts\HCI_2025/output/tables/TableA5.rtf)

. 
.                 
. /*******************************************************************************
>  14. APPENDIX TABLE A.6: EXTERNAL VALIDATION (Lee–Lee HCq, Test scores)
> ********************************************************************************/
. 
. use "$RAW/Lee_Lee_2024_HCHCq.dta", clear 

. drop if year<1980| year>2009
(166 observations deleted)

. keep country countrycode year HCQ  

. gen period = floor((year-1980)/5)*5 + 1980

. collapse (mean) HCQ, by(country countrycode period)

. harmonize_country
(5 real changes made)
(5 real changes made)
(5 real changes made)
(5 real changes made)
(0 real changes made)
(0 real changes made)
(5 real changes made)
(5 real changes made)
(5 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)

. 
. save "$CLEAN/Lee_Lee_HCQ.dta", replace 
(file C:\Users\meney\OneDrive\Manuscripts\HCI_2025/data/clean/Lee_Lee_HCQ.dta not found)
file C:\Users\meney\OneDrive\Manuscripts\HCI_2025/data/clean/Lee_Lee_HCQ.dta saved

. 
. * Test scores
. 
. use "$RAW/Lee_Lee_2024_Test_Score.dta", clear

. rename CountryName country

. keep country countrycode year tscore_baseline

. keep if inrange(year,1980,2009)
(276 observations deleted)

. gen period = floor((year-1980)/5)*5 + 1980

. collapse (mean) tscore_baseline, by(country countrycode period)

. harmonize_country
(5 real changes made)
(5 real changes made)
(5 real changes made)
(5 real changes made)
(0 real changes made)
(0 real changes made)
(5 real changes made)
(5 real changes made)
(5 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)

. save "$CLEAN/TS.dta", replace
(file C:\Users\meney\OneDrive\Manuscripts\HCI_2025/data/clean/TS.dta not found)
file C:\Users\meney\OneDrive\Manuscripts\HCI_2025/data/clean/TS.dta saved

. 
.  * Merge into main
.     use "$CLEAN/HCI_data_final.dta", clear

.     merge 1:1 countrycode period using "$CLEAN/Lee_Lee_HCQ", keep(1 3) nogen
(variable countrycode was str3, now str12 to accommodate using data's values)

    Result                      Number of obs
    -----------------------------------------
    Not matched                           197
        from master                       197  
        from using                          0  

    Matched                               350  
    -----------------------------------------

.     merge 1:1 countrycode period using "$CLEAN/TS",  keep(1 3) nogen

    Result                      Number of obs
    -----------------------------------------
    Not matched                           222
        from master                       222  
        from using                          0  

    Matched                               325  
    -----------------------------------------

. 
. 
. xtset id period, delta(5)

Panel variable: id (unbalanced)
 Time variable: period, 1980 to 2005
         Delta: 5 units

. gen l_hcq  = L.HCQ
(267 missing values generated)

. gen l_test = L.tscore_baseline
(292 missing values generated)

. keep if inrange(period,1980,2009)
(0 observations deleted)

. 
. 
. gen int_mys_gini  = l_yr_sch  * l_gini_gross
(97 missing values generated)

. gen int_hcq_gini  = l_hcq  * l_gini_gross
(267 missing values generated)

. gen int_test_gini  = l_test * l_gini_gross
(292 missing values generated)

. 
. label var l_hcq "Lee-Lee HCQCI"

. label var l_test "Standardized int. Test Score"

. label var l_gini_gross "GINI"

. label var int_mys_gini  "MYS*GINI"

. label var int_hcq_gini  "Lee-Lee HCQCI*GINI"

. label var int_test_gini "Standardized int. Test Score*GINI"

. 
. 
. 
. xtreg ggdppc l_yr_sch l_gini_gross int_mys_gini $CONTROLS i.period, fe vce(cluster id)

Fixed-effects (within) regression               Number of obs     =        398
Group variable: id                              Number of groups  =         90

R-squared:                                      Obs per group:
     Within  = 0.5937                                         min =          1
     Between = 0.0160                                         avg =        4.4
     Overall = 0.0246                                         max =          5

                                                F(12, 89)         =      16.28
corr(u_i, Xb) = -0.9828                         Prob > F          =     0.0000

                                    (Std. err. adjusted for 90 clusters in id)
------------------------------------------------------------------------------
             |               Robust
      ggdppc | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
    l_yr_sch |   3.657153    1.45617     2.51   0.014     .7637735    6.550532
l_gini_gross |   .7479036   .3436143     2.18   0.032     .0651492    1.430658
int_mys_gini |  -.0637454   .0302871    -2.10   0.038    -.1239253   -.0035656
     GCF_GDP |   .0542597   .0391428     1.39   0.169    -.0235163    .1320357
    openness |   .0295469   .0084953     3.48   0.001     .0126668    .0464269
        gpop |   .0668042   .3534823     0.19   0.851    -.6355576     .769166
  expectancy |   .1135492    .095099     1.19   0.236    -.0754105    .3025089
  l_ln_GDPpc |  -12.12766   1.193474   -10.16   0.000    -14.49907   -9.756251
             |
      period |
       1990  |  -.2928618   .3326058    -0.88   0.381    -.9537424    .3680189
       1995  |   1.100345   .4435389     2.48   0.015     .2190425    1.981647
       2000  |   1.608087   .6830132     2.35   0.021     .2509542    2.965219
       2005  |   1.645646    .842241     1.95   0.054     -.027869    3.319161
             |
       _cons |   55.11562   20.68275     2.66   0.009     14.01944     96.2118
-------------+----------------------------------------------------------------
     sigma_u |  14.529627
     sigma_e |  1.8854494
         rho |  .98343969   (fraction of variance due to u_i)
------------------------------------------------------------------------------

. est store V_1

. 
. xtreg ggdppc l_hcq l_gini_gross int_hcq_gini $CONTROLS i.period, fe vce(cluster id)

Fixed-effects (within) regression               Number of obs     =        264
Group variable: id                              Number of groups  =         69

R-squared:                                      Obs per group:
     Within  = 0.6634                                         min =          3
     Between = 0.0430                                         avg =        3.8
     Overall = 0.0296                                         max =          4

                                                F(11, 68)         =      26.79
corr(u_i, Xb) = -0.9907                         Prob > F          =     0.0000

                                    (Std. err. adjusted for 69 clusters in id)
------------------------------------------------------------------------------
             |               Robust
      ggdppc | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
       l_hcq |   3.937108   3.720542     1.06   0.294    -3.487118    11.36133
l_gini_gross |   .4017015   .3316751     1.21   0.230    -.2601458    1.063549
int_hcq_gini |  -.0862495   .0752471    -1.15   0.256    -.2364027    .0639037
     GCF_GDP |   .0500822   .0445844     1.12   0.265    -.0388846     .139049
    openness |    .021171   .0077274     2.74   0.008     .0057512    .0365908
        gpop |  -.1821611   .1095365    -1.66   0.101    -.4007377    .0364155
  expectancy |   -.224181   .1060829    -2.11   0.038    -.4358661   -.0124959
  l_ln_GDPpc |  -14.04157   1.056783   -13.29   0.000    -16.15034   -11.93279
             |
      period |
       1995  |   2.028982   .3884173     5.22   0.000     1.253907    2.804056
       2000  |   4.031523   .5540843     7.28   0.000     2.925865    5.137181
       2005  |   4.978154    .700093     7.11   0.000      3.58114    6.375168
             |
       _cons |   123.0494   20.82029     5.91   0.000     81.50314    164.5956
-------------+----------------------------------------------------------------
     sigma_u |  16.847419
     sigma_e |  1.5273987
         rho |  .99184765   (fraction of variance due to u_i)
------------------------------------------------------------------------------

. est store V_2

. 
. xtreg ggdppc l_test l_gini_gross int_test_gini $CONTROLS i.period, fe vce(cluster id)

Fixed-effects (within) regression               Number of obs     =        248
Group variable: id                              Number of groups  =         69

R-squared:                                      Obs per group:
     Within  = 0.5718                                         min =          3
     Between = 0.1073                                         avg =        3.6
     Overall = 0.0701                                         max =          4

                                                F(11, 68)         =      17.54
corr(u_i, Xb) = -0.9861                         Prob > F          =     0.0000

                                     (Std. err. adjusted for 69 clusters in id)
-------------------------------------------------------------------------------
              |               Robust
       ggdppc | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
       l_test |   .0526765   .0486204     1.08   0.282     -.044344    .1496969
 l_gini_gross |   .4853314   .5368459     0.90   0.369    -.5859278    1.556591
int_test_gini |  -.0010928   .0010457    -1.05   0.300    -.0031794    .0009938
      GCF_GDP |   .0978461   .0393745     2.49   0.015     .0192755    .1764167
     openness |   .0287329   .0085583     3.36   0.001     .0116551    .0458107
         gpop |  -.4636644   .1227976    -3.78   0.000    -.7087032   -.2186257
   expectancy |    .190122   .1056112     1.80   0.076     -.020622     .400866
   l_ln_GDPpc |  -10.98042   1.225738    -8.96   0.000    -13.42634   -8.534497
              |
       period |
        1995  |   1.113311   .4537958     2.45   0.017     .2077756    2.018846
        2000  |   2.419413   .6577291     3.68   0.000     1.106935    3.731891
        2005  |   2.332761   .7813693     2.99   0.004     .7735631     3.89196
              |
        _cons |   59.82903   32.83066     1.82   0.073     -5.68353    125.3416
--------------+----------------------------------------------------------------
      sigma_u |  11.307155
      sigma_e |  1.4651193
          rho |  .98348767   (fraction of variance due to u_i)
-------------------------------------------------------------------------------

. est store V_3

. 
. esttab V_1 V_2 V_3 using "$TABLES/TableA6.rtf", replace $ESTOPT ///
>     order(l_yr_sch  l_hcq l_test  int_mys_gini int_hcq_gini int_test_gini l_gini_gross $CONTROLS)  title("Table A.6: External Validation Using Learni
> ng-Based Human Capital Measures and Standardized International Test Score")
(file C:\Users\meney\OneDrive\Manuscripts\HCI_2025/output/tables/TableA6.rtf not found)
(output written to C:\Users\meney\OneDrive\Manuscripts\HCI_2025/output/tables/TableA6.rtf)

. 
.                 
. /*******************************************************************************        
> * 15. APPENDIX TABLE A.7: Adult Schooling (Aged 25+)  
> ********************************************************************************/
. gen int_mys25_gini  = l_yr_sch25 * l_gini_gross
(97 missing values generated)

. label var int_mys25_gini "Adult schooling*GINI"

. label var l_gini_gross "GINI"

. xtreg ggdppc l_yr_sch25 i.period, fe vce(cluster id)

Fixed-effects (within) regression               Number of obs     =        449
Group variable: id                              Number of groups  =         97

R-squared:                                      Obs per group:
     Within  = 0.1322                                         min =          4
     Between = 0.0106                                         avg =        4.6
     Overall = 0.0288                                         max =          5

                                                F(5, 96)          =       4.72
corr(u_i, Xb) = -0.5302                         Prob > F          =     0.0007

                                    (Std. err. adjusted for 97 clusters in id)
------------------------------------------------------------------------------
             |               Robust
      ggdppc | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
  l_yr_sch25 |     .50537   .4452039     1.14   0.259    -.3783528    1.389093
             |
      period |
       1990  |  -2.136146   .6321235    -3.38   0.001    -3.390902   -.8813912
       1995  |   .2036464   .6286121     0.32   0.747    -1.044139    1.451432
       2000  |   .3328207   .8111489     0.41   0.682    -1.277297    1.942939
       2005  |  -.4591248   1.039349    -0.44   0.660    -2.522217    1.603967
             |
       _cons |  -.9798236   2.555853    -0.38   0.702    -6.053152    4.093505
-------------+----------------------------------------------------------------
     sigma_u |    2.32706
     sigma_e |    3.36023
         rho |  .32414064   (fraction of variance due to u_i)
------------------------------------------------------------------------------

. est store A5_1

. 
. xtreg ggdppc l_yr_sch25 $CONTROLS i.period, fe vce(cluster id)

Fixed-effects (within) regression               Number of obs     =        398
Group variable: id                              Number of groups  =         90

R-squared:                                      Obs per group:
     Within  = 0.5724                                         min =          1
     Between = 0.0241                                         avg =        4.4
     Overall = 0.0325                                         max =          5

                                                F(10, 89)         =      15.99
corr(u_i, Xb) = -0.9795                         Prob > F          =     0.0000

                                    (Std. err. adjusted for 90 clusters in id)
------------------------------------------------------------------------------
             |               Robust
      ggdppc | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
  l_yr_sch25 |   .8043454   .2459012     3.27   0.002      .315745    1.292946
     GCF_GDP |    .049244   .0376681     1.31   0.194    -.0256017    .1240897
    openness |   .0283687   .0083373     3.40   0.001     .0118027    .0449347
        gpop |    .121992   .3548304     0.34   0.732    -.5830484    .8270324
  expectancy |     .22561   .0855651     2.64   0.010     .0555941     .395626
  l_ln_GDPpc |  -11.72082   1.543253    -7.59   0.000    -14.78723   -8.654409
             |
      period |
       1990  |  -.4260234   .3252807    -1.31   0.194    -1.072349    .2203024
       1995  |   .8680559   .4548736     1.91   0.060    -.0357682     1.77188
       2000  |   1.247353   .6817891     1.83   0.071    -.1073477    2.602053
       2005  |   1.016654   .8854439     1.15   0.254    -.7427037    2.776013
             |
       _cons |   78.27524   15.00353     5.22   0.000     48.46355    108.0869
-------------+----------------------------------------------------------------
     sigma_u |  13.034488
     sigma_e |   1.927805
         rho |  .97859374   (fraction of variance due to u_i)
------------------------------------------------------------------------------

. est store A5_2

. 
. xtreg ggdppc l_yr_sch25 l_gini_gross int_mys25_gini $CONTROLS i.period, fe vce(cluster id)

Fixed-effects (within) regression               Number of obs     =        398
Group variable: id                              Number of groups  =         90

R-squared:                                      Obs per group:
     Within  = 0.6041                                         min =          1
     Between = 0.0179                                         avg =        4.4
     Overall = 0.0271                                         max =          5

                                                F(12, 89)         =      20.86
corr(u_i, Xb) = -0.9811                         Prob > F          =     0.0000

                                      (Std. err. adjusted for 90 clusters in id)
--------------------------------------------------------------------------------
               |               Robust
        ggdppc | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
---------------+----------------------------------------------------------------
    l_yr_sch25 |   3.747172   1.350791     2.77   0.007      1.06318    6.431164
  l_gini_gross |   .7068532    .303212     2.33   0.022     .1043774    1.309329
int_mys25_gini |   -.061646   .0275667    -2.24   0.028    -.1164205   -.0068714
       GCF_GDP |   .0585651   .0381227     1.54   0.128     -.017184    .1343141
      openness |   .0271148   .0081093     3.34   0.001     .0110018    .0432279
          gpop |   .0594299    .350805     0.17   0.866    -.6376121     .756472
    expectancy |   .1384408   .0953015     1.45   0.150    -.0509212    .3278029
    l_ln_GDPpc |  -12.10995   1.062535   -11.40   0.000    -14.22118   -9.998712
               |
        period |
         1990  |  -.4411608   .3324772    -1.33   0.188    -1.101786    .2194643
         1995  |   .7621104   .4717416     1.62   0.110    -.1752301    1.699451
         2000  |   1.052856   .7323326     1.44   0.154    -.4022737    2.507985
         2005  |   .8920867   .9057338     0.98   0.327    -.9075871     2.69176
               |
         _cons |   54.60365   18.87338     2.89   0.005     17.10264    92.10466
---------------+----------------------------------------------------------------
       sigma_u |  13.936327
       sigma_e |  1.8612426
           rho |  .98247608   (fraction of variance due to u_i)
--------------------------------------------------------------------------------

. est store A5_3

. 
. esttab A5_1 A5_2 A5_3 using "$TABLES/TableA7.rtf", replace $ESTOPT ///
> order(l_yr_sch25 int_mys25_gini l_gini_gross $CONTROLS) ///
> title("Table A.7: Fixed-Effects Estimates Using Adult Human Capital (Population Aged 25+)")
(file C:\Users\meney\OneDrive\Manuscripts\HCI_2025/output/tables/TableA7.rtf not found)
(output written to C:\Users\meney\OneDrive\Manuscripts\HCI_2025/output/tables/TableA7.rtf)

. 
.         
. /*******************************************************************************
>  16. APPENDIX TABLE A.8:REPLICATION OF TABLE 3 WITH RELAXED PANEL LENGTH (T >= 4)
> ********************************************************************************/
. use "$CLEAN/HCI_data.dta", clear

. by id: gen T=_N

. drop if T < 4 // 113 remaining countries (From 97 countries)
(37 observations deleted)

. tab T

          T |      Freq.     Percent        Cum.
------------+-----------------------------------
          4 |         64       10.47       10.47
          5 |        175       28.64       39.12
          6 |        372       60.88      100.00
------------+-----------------------------------
      Total |        611      100.00

. drop T 

. xtset id period, delta(5) 

Panel variable: id (unbalanced)
 Time variable: period, 1980 to 2005
         Delta: 5 units

. 
. xtile gini_q = l_gini_gross, nq(4)

. label define gq 1 "Q1 (Lowest)" 2 "Q2" 3 "Q3" 4 "Q4 (Highest)"

. label values gini_q gq

. 
. * Interaction model
. xtreg ggdppc c.l_yr_sch##i.gini_q $CONTROLS i.period, fe vce(cluster id)

Fixed-effects (within) regression               Number of obs     =        443
Group variable: id                              Number of groups  =        105

R-squared:                                      Obs per group:
     Within  = 0.5749                                         min =          1
     Between = 0.0069                                         avg =        4.2
     Overall = 0.0184                                         max =          5

                                                F(16, 104)        =      12.31
corr(u_i, Xb) = -0.9844                         Prob > F          =     0.0000

                                        (Std. err. adjusted for 105 clusters in id)
-----------------------------------------------------------------------------------
                  |               Robust
           ggdppc | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
------------------+----------------------------------------------------------------
         l_yr_sch |    .866969   .2762041     3.14   0.002     .3192459    1.414692
                  |
           gini_q |
              Q2  |   4.299567   2.244972     1.92   0.058    -.1522963     8.75143
              Q3  |   5.142906   2.383303     2.16   0.033     .4167265    9.869085
    Q4 (Highest)  |   7.355519   2.652016     2.77   0.007     2.096473    12.61457
                  |
gini_q#c.l_yr_sch |
              Q2  |  -.3607951   .2298103    -1.57   0.119    -.8165176    .0949273
              Q3  |  -.5250507   .2585703    -2.03   0.045    -1.037805   -.0122961
    Q4 (Highest)  |  -.7848942   .2897315    -2.71   0.008    -1.359443   -.2103458
                  |
          GCF_GDP |   .0752297   .0349506     2.15   0.034     .0059213     .144538
         openness |   .0333606   .0087228     3.82   0.000     .0160629    .0506583
             gpop |  -.2007001   .3268566    -0.61   0.541    -.8488691    .4474688
       expectancy |   .1025048   .0884835     1.16   0.249    -.0729613     .277971
       l_ln_GDPpc |  -11.87173   1.424512    -8.33   0.000    -14.69659   -9.046866
                  |
           period |
            1990  |  -.0242412   .3248581    -0.07   0.941    -.6684469    .6199646
            1995  |   1.528709   .4197448     3.64   0.000     .6963389    2.361078
            2000  |    2.30919   .5646693     4.09   0.000      1.18943    3.428951
            2005  |   2.566957   .6991855     3.67   0.000     1.180445    3.953468
                  |
            _cons |    84.1078   12.98399     6.48   0.000     58.36007    109.8555
------------------+----------------------------------------------------------------
          sigma_u |  14.794298
          sigma_e |  1.9035899
              rho |  .98371354   (fraction of variance due to u_i)
-----------------------------------------------------------------------------------

. est store interq_total

. 
. xtreg ggdppc c.l_yr_sch_pri##i.gini_q $CONTROLS  i.period, fe vce(cluster id)

Fixed-effects (within) regression               Number of obs     =        443
Group variable: id                              Number of groups  =        105

R-squared:                                      Obs per group:
     Within  = 0.5765                                         min =          1
     Between = 0.0079                                         avg =        4.2
     Overall = 0.0195                                         max =          5

                                                F(16, 104)        =      13.20
corr(u_i, Xb) = -0.9842                         Prob > F          =     0.0000

                                            (Std. err. adjusted for 105 clusters in id)
---------------------------------------------------------------------------------------
                      |               Robust
               ggdppc | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
----------------------+----------------------------------------------------------------
         l_yr_sch_pri |   1.325583   .4675769     2.84   0.006     .3983607    2.252806
                      |
               gini_q |
                  Q2  |   3.834976   2.004795     1.91   0.059    -.1406068    7.810559
                  Q3  |   5.114484   2.286183     2.24   0.027     .5808975    9.648071
        Q4 (Highest)  |   8.916035   2.713913     3.29   0.001     3.534244    14.29783
                      |
gini_q#c.l_yr_sch_pri |
                  Q2  |  -.4514723   .3003455    -1.50   0.136    -1.047069     .144124
                  Q3  |  -.8347978   .3806839    -2.19   0.031    -1.589708   -.0798873
        Q4 (Highest)  |  -1.570564   .4543101    -3.46   0.001    -2.471478   -.6696503
                      |
              GCF_GDP |   .0686827   .0363162     1.89   0.061    -.0033337     .140699
             openness |   .0370102   .0088487     4.18   0.000      .019463    .0545575
                 gpop |  -.1821755   .3381825    -0.54   0.591    -.8528041     .488453
           expectancy |   .0858567   .0900134     0.95   0.342    -.0926432    .2643566
           l_ln_GDPpc |  -11.59717   1.479529    -7.84   0.000    -14.53114   -8.663211
                      |
               period |
                1990  |   .0644023   .3283555     0.20   0.845    -.5867389    .7155436
                1995  |   1.674425   .4159949     4.03   0.000      .849492    2.499359
                2000  |   2.562357   .5487032     4.67   0.000     1.474258    3.650456
                2005  |    2.91106   .7059516     4.12   0.000     1.511131    4.310988
                      |
                _cons |   82.84985   13.89615     5.96   0.000     55.29325    110.4064
----------------------+----------------------------------------------------------------
              sigma_u |  14.724095
              sigma_e |  1.9000123
                  rho |  .98362115   (fraction of variance due to u_i)
---------------------------------------------------------------------------------------

. est store interq_pre

. 
. xtreg ggdppc c.l_yr_sch_post##i.gini_q $CONTROLS  i.period, fe vce(cluster id)

Fixed-effects (within) regression               Number of obs     =        443
Group variable: id                              Number of groups  =        105

R-squared:                                      Obs per group:
     Within  = 0.5637                                         min =          1
     Between = 0.0062                                         avg =        4.2
     Overall = 0.0172                                         max =          5

                                                F(16, 104)        =      12.10
corr(u_i, Xb) = -0.9851                         Prob > F          =     0.0000

                                             (Std. err. adjusted for 105 clusters in id)
----------------------------------------------------------------------------------------
                       |               Robust
                ggdppc | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-----------------------+----------------------------------------------------------------
         l_yr_sch_post |   .8088604   .4405202     1.84   0.069    -.0647077    1.682428
                       |
                gini_q |
                   Q2  |   2.547598   1.366876     1.86   0.065    -.1629687    5.258165
                   Q3  |   2.433866    1.33468     1.82   0.071    -.2128547    5.080586
         Q4 (Highest)  |   3.115542   1.508905     2.06   0.041     .1233267    6.107757
                       |
gini_q#c.l_yr_sch_post |
                   Q2  |  -.4093859   .4163566    -0.98   0.328    -1.235037    .4162649
                   Q3  |  -.5361995    .435845    -1.23   0.221    -1.400496    .3280974
         Q4 (Highest)  |  -.7504672    .467204    -1.61   0.111     -1.67695     .176016
                       |
               GCF_GDP |   .0766508   .0365242     2.10   0.038      .004222    .1490796
              openness |   .0311388   .0088963     3.50   0.001     .0134972    .0487805
                  gpop |   -.230432    .320716    -0.72   0.474    -.8664239    .4055599
            expectancy |   .1411528   .0881218     1.60   0.112     -.033596    .3159016
            l_ln_GDPpc |  -11.86941   1.495616    -7.94   0.000    -14.83527   -8.903544
                       |
                period |
                 1990  |   .0325323   .3257533     0.10   0.921    -.6134487    .6785134
                 1995  |   1.703135   .4318871     3.94   0.000      .846687    2.559584
                 2000  |   2.516733    .584642     4.30   0.000     1.357366      3.6761
                 2005  |   2.749941    .733639     3.75   0.000     1.295107    4.204775
                       |
                 _cons |   85.74839   13.27179     6.46   0.000     59.42994    112.0668
-----------------------+----------------------------------------------------------------
               sigma_u |   15.02912
               sigma_e |  1.9283865
                   rho |   .9838032   (fraction of variance due to u_i)
----------------------------------------------------------------------------------------

. est store interq_post

. 
. esttab interq_total interq_pre interq_post using "$TABLES/TableA8.rtf", replace se r2 label star(* 0.10 ** 0.05 *** 0.01) b(%9.3f) se(%9.3f) nomtitle
> s nogaps compress ///
>         keep( ///
>         l_yr_sch ///
>         l_yr_sch_pri ///
>         l_yr_sch_post ///
>         2.gini_q 3.gini_q 4.gini_q ///
>         2.gini_q#c.l_yr_sch 3.gini_q#c.l_yr_sch 4.gini_q#c.l_yr_sch ///
>         2.gini_q#c.l_yr_sch_pri 3.gini_q#c.l_yr_sch_pri 4.gini_q#c.l_yr_sch_pri ///
>         2.gini_q#c.l_yr_sch_post 3.gini_q#c.l_yr_sch_post 4.gini_q#c.l_yr_sch_post ///
>         GCF_GDP openness gpop expectancy l_ln_GDPpc  ///
>         _cons ///
>     ) ///
>     coeflabels( ///
>         l_yr_sch "Mean years of schooling" ///
>         l_yr_sch_pri "Primary schooling" ///
>         l_yr_sch_post "Post-primary schooling" ///
>         2.gini_q "Q2" ///
>         3.gini_q "Q3" ///
>         4.gini_q "Q4" ///
>         2.gini_q#c.l_yr_sch "Q2 × Mean years of schooling" ///
>         3.gini_q#c.l_yr_sch "Q3 × Mean years of schooling" ///
>         4.gini_q#c.l_yr_sch "Q4 × Mean years of schooling" ///
>         2.gini_q#c.l_yr_sch_pri "Q2 × Primary schooling" ///
>         3.gini_q#c.l_yr_sch_pri "Q3 × Primary schooling" ///
>         4.gini_q#c.l_yr_sch_pri "Q4 × Primary schooling" ///
>         2.gini_q#c.l_yr_sch_post "Q2 × Post-primary schooling" ///
>         3.gini_q#c.l_yr_sch_post "Q3 × Post-primary schooling" ///
>         4.gini_q#c.l_yr_sch_post "Q4 × Post-primary schooling" ///
>         GCF_GDP "Investment share of GDP (%)" ///
>         openness "Trade openness (% of GDP)" ///
>         gpop "Population growth rate (%)" ///
>         expectancy "Life expectancy" ///
>         l_ln_GDPpc "Initial GDP per capita" ///
>         _cons "Constant" ///
>     ) ///
>     refcat( ///
>         l_yr_sch "Schooling" ///
>         2.gini_q "Inequality Quartile" ///
>         2.gini_q#c.l_yr_sch "Schooling × Inequality Quartiles" ///
>         GCF_GDP "Controls", ///
>         nolabel ///
>     ) ///
>     order( ///
>         l_yr_sch l_yr_sch_pri l_yr_sch_post ///
>         2.gini_q 3.gini_q 4.gini_q ///
>         2.gini_q#c.l_yr_sch 3.gini_q#c.l_yr_sch 4.gini_q#c.l_yr_sch ///
>         2.gini_q#c.l_yr_sch_pri 3.gini_q#c.l_yr_sch_pri 4.gini_q#c.l_yr_sch_pri ///
>         2.gini_q#c.l_yr_sch_post 3.gini_q#c.l_yr_sch_post 4.gini_q#c.l_yr_sch_post ///
>         GCF_GDP openness gpop expectancy l_ln_GDPpc _cons ///
>     ) ///
>     title("Table A.8: Schooling Association with Growth across Inequality Quartiles with 113 Countries (T>=4)") 
(file C:\Users\meney\OneDrive\Manuscripts\HCI_2025/output/tables/TableA8.rtf not found)
(output written to C:\Users\meney\OneDrive\Manuscripts\HCI_2025/output/tables/TableA8.rtf)

.         
. 
. ********************************************************************************
. * END
. ********************************************************************************
. log close
      name:  <unnamed>
       log:  C:\Users\meney\OneDrive\Manuscripts\HCI_2025/output/logs/run_ 8 Feb 2026_103200.log
  log type:  text
 closed on:   8 Feb 2026, 10:33:32
-------------------------------------------------------------------------------------------------------------------------------------------------------
